[node-patches] Change in ovirt-node[master]: edit-node: set selinux permissive during yum installations

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Apr 18 11:47:45 UTC 2013


Fabian Deutsch has posted comments on this change.

Change subject: edit-node: set selinux permissive during yum installations
......................................................................


Patch Set 2: (1 inline comment)

Added an example

....................................................
File tools/edit-node
Line 1481:                     logging.error("Error Installing Drive Update Package : %s" % options.install_dup)
Line 1482:                     return 1
Line 1483:             if selinux_enforcing:
Line 1484:                print "Returning SELinux To Enforcing"
Line 1485:                selinux.security_setenforce(1)
Example:

 old_selinux_state = selinux.security_getenforce()
 try:
   selinux.security_setenforce(0)

   # Do stuff
   if failure:
     raise RuntimeError("The error was ...")

   # Do more stuff if no failure as detected

 except RuntimeError as e:
     # do something with the error

 finally:
   selinux.security_setenforce(old_selinux_state)
Line 1486:             if not options.password is None:
Line 1487:                 print "Setting Account Passwords"
Line 1488:                 editor._set_password(options)
Line 1489:             if not options.ssh_keys is None:


--
To view, visit http://gerrit.ovirt.org/12950
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6d6ca125c76feefccfeffd6acb40c923767cc90d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list