[node-patches] Change in ovirt-node[master]: password: Replace libuser and update the persist/unpersist c...

rbarry at redhat.com rbarry at redhat.com
Sun Nov 8 22:32:02 UTC 2015


Ryan Barry has posted comments on this change.

Change subject: password: Replace libuser and update the persist/unpersist calls
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/48216/3/src/ovirtnode/password.py
File src/ovirtnode/password.py:

Line 44:         Config().unpersist("/etc/passwd")
Line 45: 
Line 46:         # Workaround for admin.setpassUser (libuser) not working properly
Line 47:         # with persist command during upgrades/reinstall or downgrade
Line 48:         # See more: BZ#1263648
In further testing, libuser is not the problem.

Even before libuser is initialized, the file can't be renamed (with os.rename)

Also tried:

Closing out pam in upgrade_page
Removing libuser and ovirtfunctions from the imports
lazy umount

What works:
import ovirt.node.utils.fs.Config in progress_page
unpersist the files in progress_page.__init__ (or InstallerThread.__init__, or rank, or anything else which is run when the installer initializes)

Moving the SetPassword transaction to the first one run does not resolve this, though.

The lock on /etc/shadow firmly appears to be in the installer codebase, though I'm not sure why it's not being shown by fuser/lsof. I'm going through a process of eliminating plugins to find the problem. Hacking it so only progress_page runs (and defaults to upgrading) works completely. It would be nice to find the root problem.
Line 49:         #
Line 50:         with open("/etc/shadow", "r") as f:
Line 51:             shadow_file = f.readlines()
Line 52: 


-- 
To view, visit https://gerrit.ovirt.org/48216
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8a1b3fe1343e6820e83e2a9db8ff6715d959336
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Anatoly Litovsky <tlitovsk at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes



More information about the node-patches mailing list