Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passwd: Use check-* file json config. entries to migrate data across commits #101

Merged
merged 1 commit into from
Jan 22, 2015

Conversation

james-antill
Copy link
Contributor

Needs some docs. also a bit more testing before merging, as a bunch of code got moved about and reused.

Basically the migrate code will now look at the files pointed to by check-passwd/check-group so that they can be migrated across branches.

@cgwalters
Copy link
Member

Keep in mind too the use case I need in one downstream case is migrating between repositories, not between branches. The idea is that the "release repository" doesn't expose internal history.

@james-antill
Copy link
Contributor Author

Right, you can extract the passwd/group files and put those in the JSON for the first build. Or am I missing something?

@james-antill
Copy link
Contributor Author

Updated the kind test and fixed the perform_migrate test.

@cgwalters
Copy link
Member

Hm, so for someone doing their first compose, they'd need to:

  • Make a tree using a treefile without the check-passwd config
  • Use say ostree cat branch /usr/lib/passwd > passwd to extract the files
  • Commit those to the git repo holding the treefile
  • Edit the treefile to add check-passwd pointing to that content

If so, I'm fine with that as I cannot think of a better way without doing #49. I have been thinking recently that we could pretty easily write a custom program outside of systemd that implemented sysusers, suitable for backporting to older systems.

But in the short term I think this is OK actually, because people who have existing trees and are bit by uid/gid variance can more easily extract their existing config and bake it.

@james-antill
Copy link
Contributor Author

Yeh, that's it. The only bit that's kind of ugly is the "ostree cat" part ... so we could add something to make that easier. But hopefully not many people will need to do this anyway. You want to merge?

@cgwalters
Copy link
Member

Only one minor comment. Otherwise I think this is OK. 👍

Long term though we are going to need a better story, and also particularly one that works with containers too. Which gets interesting for Docker containers without systemd...we have no way to provide on-boot hooks at the moment.

james-antill added a commit that referenced this pull request Jan 22, 2015
passwd: Use check-* file json config. entries to migrate data across commits
@james-antill james-antill merged commit fa254de into coreos:master Jan 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants