intel / ccloudvm

Configurable Cloud VM is a small command line tool for automatically creating development and demo environments for complex projects. The tool sets up these development environments inside a virtual machine which it automatically creates on the user’s host computer. This avoids polluting the user’s host machine with components from the chosen development environment and provides a clean, predictable and repeatable environment in which this development environment can run.
Apache License 2.0
32 stars 19 forks source link

Create 'stack' user for devstack workload #84

Closed ganeshmaharaj closed 6 years ago

ganeshmaharaj commented 6 years ago

Devstack assumes the user starting stack and all the follow-on services is 'stack' and has hardcoded that in a few locations. This change creates a user with that name for devstack workload and stacks under that user.

Signed-off-by: Ganesh Maharaj Mahalingam ganesh.mahalingam@intel.com

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 68.226% when pulling 37c602291e541b484dc006773c698957bdf881cc on ganeshmaharaj:devstack-stack-user into 059e565b37c0b6b562e81ca9f6f14fee242993f2 on intel:master.

markdryan commented 6 years ago

@ganeshmaharaj I'm unable to connect to the VM using this workload. Not sure why. Perhaps the user account created by the xenial workload is failing. This might happen if the stack account got created first and took the UUID of 1000. Does it work for you?

ganeshmaharaj commented 6 years ago

Yes, I was able to login into the VM and stack the system. I was on a fedora machine. Let me try this out on a Ubuntu host.

On Tue, Mar 27, 2018, 4:23 AM Mark Ryan notifications@github.com wrote:

@ganeshmaharaj https://github.com/ganeshmaharaj I'm unable to connect to the VM using this workload. Not sure why. Perhaps the user account created by the xenial workload is failing. This might happen if the stack account got created first and took the UUID of 1000. Does it work for you?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/intel/ccloudvm/pull/84#issuecomment-376489600, or mute the thread https://github.com/notifications/unsubscribe-auth/AFSZuoYzY5exEyVXDbebprciot1y2Sbdks5tiiFBgaJpZM4S8X1Z .

markdryan commented 6 years ago

@ganeshmaharaj Try it a few times. Sometimes it works for me sometimes it doesn't work. When it fails I can still log into the instance using netcat. I see that there is only one user, stack, and it has the uid the xenial workload assigns to the default account, which is presumably why the user account did not get created. It seems as though cloud-init on ubuntu is processing the user accounts in random order, or perhaps in parallel.

ganeshmaharaj commented 6 years ago

Aaah.. just thinking out loud, any reason we wish to specify the primary user's uid and gid against letting the system choose it? That might overcome this issue.

On Tue, Mar 27, 2018, 6:48 AM Mark Ryan notifications@github.com wrote:

@ganeshmaharaj https://github.com/ganeshmaharaj Try it a few times. Sometimes it works for me sometimes it doesn't work. When it fails I can still log into the instance using netcat. I see that there is only one user, stack, and it has the uid the xenial workload assigns to the default account, which is presumably why the user account did not get created. It seems as though cloud-init on ubuntu is processing the user accounts in random order.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/intel/ccloudvm/pull/84#issuecomment-376531442, or mute the thread https://github.com/notifications/unsubscribe-auth/AFSZuhYF6u2AjhR3bYb6lk8ghuuLGk-_ks5tikMcgaJpZM4S8X1Z .

markdryan commented 6 years ago

because 9p file sharing doesn't work if the uid of the user on the host and the guest differ.

markdryan commented 6 years ago

Options are:

  1. Don't inherit from xenial.
  2. Hardcode the uid for the stack user.
  3. Add a template function that will return a UID that is not the UID of the host user.
  4. See if there's a bug in cloud-init about this and whether it's fixed.