-
Notifications
You must be signed in to change notification settings - Fork 19
ccloudvm create as non-root user fails at "Building CIAO" step #89
Comments
Here is the full ccloudvm create context. |
Tried adding user account to the sudo and docker groups as well. No difference. It looks like some of the chown commands run during cloud-init are not sudo:
... and the non-root account does indeed get sudo access:
|
The permission issue may be separate though, plus /home/USER/go is mounted in /etc/fstab and shows up as root:root, so there's no way to chown. This is the part that appears to fail:
When I try this interactively as the non-root account:
|
@jdandrea This looks like a 9p issue. There could be a number of reasons for this.
You could try changing the security model used to mount the go path by passing the following parameter to create --mount hostgo,none,$HOME/go If this doesn't work, edit the ciao.yaml workload locally and remove lines 7 to 12 https://github.com/intel/ccloudvm/blob/master/workloads/ciao.yaml#L7 |
@markdryan Thanks! Let's see... when I created the account I did not resync. What I did was:
I've since destroyed the instance and can't check uid/gid for a match, but I will do that next go-round. (Groan.) I'll try the security model if the uid/gid match doesn't work. |
@jdandrea Thanks for the info. There was a bug a while back in which 9P file sharing did not work if you were not the first user on the host machine, i.e., you did not have uid and gid of 1000. This should be fixed, by forcing the guest user to have the same uid and gid as the host user. I just wanted to double check. 9P can be a bit tricky to get to work sometimes. |
Update: My As a workaround, ensure the |
There doesn't seem to be any way to set the gid of a user in cloud-init. It is always set to the uid. I had thought this was supported in cloud-init when I made the gid/uid changes but it seems I was wrong. I can't see any real way of fixing this. We could detect the case and issue a warning if the host user's uid and gid do not match and he launches a VM with 9p mounts. At least then he'd know that 9p file sharing was unlikely to work. |
Here's the cloud-init bug https://bugs.launchpad.net/cloud-init/+bug/1396362 Perhaps we should change the title of this bug to be something like. 9p filesharing does not work if the host user's gid and uid differ. |
In light of the situation, I think issuing a warning is a fine and thoughtful thing to do. |
It was recommended to only create the ciao ccloudvm instance as a non-root user.
For the non-root user on the ccloudvm host:
sudo gpasswd -a $USER kvm
Next:
See attached cloud-init-output.log from the ccloudvm instance. Operations were not permitted under
/home/jdandrea/go
(e.g., changing ownership from root to jdandrea, presumably), and ciao installation failed as a result.Here's what appeared on the ccloudvm instance during the same time:
The text was updated successfully, but these errors were encountered: