Page MenuHomeFreeBSD

release: Prepare Vagrant cloudware images for building as non-root
ClosedPublic

Authored by markj on Tue, Sep 9, 2:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 25, 5:54 AM
Unknown Object (File)
Wed, Sep 24, 9:49 AM
Unknown Object (File)
Wed, Sep 24, 7:14 AM
Unknown Object (File)
Wed, Sep 24, 5:48 AM
Unknown Object (File)
Fri, Sep 19, 6:58 AM
Unknown Object (File)
Thu, Sep 18, 11:07 AM
Unknown Object (File)
Fri, Sep 12, 9:18 PM
Unknown Object (File)
Wed, Sep 10, 7:11 PM

Details

Summary

Add metalog entries for various files. This is a bit incomplete as
pw(8) doesn't yet have support for emitting metalog entries, which we
need since it's used here to create a user.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Tue, Sep 9, 2:54 PM

OK with me as a partial step

This revision is now accepted and ready to land.Tue, Sep 9, 4:24 PM

@cperciva has said that he's planning to remove Vagrant support at some point so I will just hold off on this one for now.

@cperciva has said that he's planning to remove Vagrant support at some point so I will just hold off on this one for now.

We now have a developer interested in making Vagrant support work; so please go ahead with this change.

@cperciva has said that he's planning to remove Vagrant support at some point so I will just hold off on this one for now.

We now have a developer interested in making Vagrant support work; so please go ahead with this change.

So, to be clear this change is not complete. In particular, this script creates a vagrant user, which isn't compatible with the use of an mtree metalog. I can see a couple of options:

  • somehow use cloud-init to create the user during first boot,
  • teach pw(8) to emit metalog entries and use that functionality here.

@cperciva @emaste do you have any opinions on the best path here? I'm inclined towards the latter.

I think your proposed path from earlier, of "don't do Vagrant if we're doing no-root builds" is ok for now. We'll tackle the no-root issues with Vagrant as part of resurrecting Vagrant builds.

BTW in EC2 we install amazon-ssm-agent and that creates a user -- how are you handling the pw(8) usage there?

BTW in EC2 we install amazon-ssm-agent and that creates a user -- how are you handling the pw(8) usage there?

Good question. The home directory for that user won't be included in the image, which is a bug. I'm not sure if it's a problem in practice: does anything actually need to be able to log in as the amazon ssm user? In the Vagrant case, the home directory is clearly required. This all suggests that having a -M <METALOG> option for pw(8) would be useful...