Merge lp:~james-page/nova/fix-lxc-and-primary-group into lp:~ubuntu-server-dev/nova/diablo
Proposed by
James Page
Status: | Merged |
---|---|
Merged at revision: | 216 |
Proposed branch: | lp:~james-page/nova/fix-lxc-and-primary-group |
Merge into: | lp:~ubuntu-server-dev/nova/diablo |
Diff against target: |
48 lines (+20/-3) 2 files modified
debian/changelog (+9/-2) debian/nova-common.postinst (+11/-1) |
To merge this branch: | bzr merge lp:~james-page/nova/fix-lxc-and-primary-group |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Server Developers | Pending | ||
Review via email: mp+77308@code.launchpad.net |
Description of the change
Fixup issues with primary group ownership of new files for upgraded nova installations
Ensure that ownership of files in LXC mounted volumes under /var/lib/nova do not get updated to nova:nova
To post a comment you must log in.
A couple thoughts on this
- I was initially confused about $(groups | awk '{print 3}) , as '3' seemed strange. groups does seem to output the primary group of a user as the first field, but I think that 'id -gn <user>' more explicitly requests that. I will admit to wishing the documentation for 'id' said "primary group" rather than just "effective group", but I looked at source and it does: 'rgid = egid = pwd->pw_gid;'.
I know this is nitpick.
- I'm concerned about the '-mount' argument to 'find'. filesystem /var/lib/ nova/instances nova/instances
If the user has done something like:
mount --bind /some/large/
or even:
mount /dev/sdb1 /var/lib/
I think that we'd avoid changing ownership of those files. I don't know how serious this is.
One quick fix I had would be to do this:
# change ownership of files under /var/lib/nova/ except rootfs (LP: #861260)
find /var/lib/nova/ -name 'rootfs' -prune -o -exec chown nova:nova {} \;