Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@bergwolf
Copy link
Member

This implements the same as #248 but works with latest master instead.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
cp busybox /tmp/hyperstart-rootfs
cp iptables /tmp/hyperstart-rootfs
cp libm.so.6 /tmp/hyperstart-rootfs/lib64/
cp mount.nfs /tmp/hyperstart-rootfs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please move it to /tmp/hyperstart-rootfs/sbin/?

do
mkdir -p /tmp/hyperstart-rootfs/`dirname ${bin}`
ln -sf /mount.nfs /tmp/hyperstart-rootfs/${bin}
done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this block of code is unnecessary.

src/container.c Outdated

if (!strncmp(vol->fstype, "xfs", strlen("xfs")))
options = "nouuid";
if (!strncmp(vol->fstype, "nfs", strlen("nfs"))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you use strcmp()?
strncmp() is bug here, hyperstart is full of such bugs....

Use external mount.nfs binary (nfs-utils-1-3-4, 188354e57) to
avoid adding too much complexity (viz, rpc mnt protocol support).

Signed-off-by: Peng Tao <bergwolf@gmail.com>
@bergwolf
Copy link
Member Author

@laijs updated.

@laijs
Copy link
Contributor

laijs commented Jan 12, 2017

LGTM
@gnawux @gao-feng could you also review it?

@gnawux
Copy link
Member

gnawux commented Jan 12, 2017

LGTM, and where is the mount.nfs comes from?

@bergwolf
Copy link
Member Author

mount.nfs was built from nfs-utils(http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=summary) tag nfs-utils-1-3-4

if (hyper_mount_nfs(vol->device, path) < 0)
return -1;
/* nfs export has implicitly included _data part of the volume */
sprintf(volume, "/%s/", path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this affect container_populate_volume?

Copy link
Member Author

@bergwolf bergwolf Jan 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update: yes it does. populate will be disabled with nfs volumes, mostly because if the client creates a _data directory, it will be visible to the server and violates the idea of importing volumes from server because _data directory is not really a volume mountpoint of the server.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine, this pr LGTM

@Jimmy-Xu
Copy link

Jimmy-Xu commented Feb 3, 2017

retest this please @hykins

@gao-feng
Copy link
Contributor

gao-feng commented Feb 7, 2017

LGTM

@gao-feng gao-feng merged commit 9de9caf into hyperhq:master Feb 7, 2017
@bergwolf bergwolf deleted the nfs-volume branch May 8, 2017 07:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants