Yedidyah Bar David has uploaded a new change for review.

Change subject: packaging: setup: suppress logging of VM password
......................................................................

packaging: setup: suppress logging of VM password

Also use LOG_FILTER_KEYS for other cases, so that we can do that
right at the beginning. otopi support for that was fixed recently,
version to use based on http://gerrit.ovirt.org/25347 .

Change-Id: I92ef0a1516d7a6dd70d3fd53ceac3c71ce1eaf24
Signed-off-by: Yedidyah Bar David <[email protected]>
---
M ovirt-hosted-engine-setup.spec.in
M src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
M src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
M src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
4 files changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup 
refs/changes/91/27591/1

diff --git a/ovirt-hosted-engine-setup.spec.in 
b/ovirt-hosted-engine-setup.spec.in
index 83e2384..bd4dea6 100644
--- a/ovirt-hosted-engine-setup.spec.in
+++ b/ovirt-hosted-engine-setup.spec.in
@@ -38,7 +38,7 @@
 
 Requires:       python
 Requires:       python-ethtool >= 0.6-3
-Requires:       otopi >= 1.2.0
+Requires:       otopi >= 1.2.0-0.7
 Requires:       vdsm >= 4.14.0
 Requires:       vdsm-cli >= 4.14.0
 Requires:       vdsm-python >= 4.14.0
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py 
b/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
index de6a8b1..1b6b07b 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
@@ -129,9 +129,6 @@
                 self.environment[
                     ohostedcons.FirstHostEnv.ROOT_PASSWORD
                 ] = password
-                self.environment[otopicons.CoreEnv.LOG_FILTER].append(
-                    password
-                )
                 try:
                     fd, self._tmp_ans = tempfile.mkstemp(
                         dir=self.environment[ohostedcons.CoreEnv.TEMPDIR],
@@ -211,6 +208,9 @@
             ohostedcons.FirstHostEnv.ROOT_PASSWORD,
             None
         )
+        self.environment[otopicons.CoreEnv.LOG_FILTER_KEYS].append(
+            ohostedcons.FirstHostEnv.ROOT_PASSWORD
+        )
         self.environment.setdefault(
             ohostedcons.FirstHostEnv.FETCH_ANSWER,
             None
diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py 
b/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
index d3244dc..9e3daed 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
@@ -280,6 +280,9 @@
             ohostedcons.EngineEnv.ADMIN_PASSWORD,
             None
         )
+        self.environment[otopicons.CoreEnv.LOG_FILTER_KEYS].append(
+            ohostedcons.EngineEnv.ADMIN_PASSWORD
+        )
         self.environment.setdefault(
             ohostedcons.EngineEnv.APP_HOST_NAME,
             None
@@ -375,9 +378,6 @@
                     raise RuntimeError(
                         _('Empty password not allowed for user admin')
                     )
-        self.environment[otopicons.CoreEnv.LOG_FILTER].append(
-            self.environment[ohostedcons.EngineEnv.ADMIN_PASSWORD]
-        )
 
     @plugin.event(
         stage=plugin.Stages.STAGE_VALIDATION,
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
index 251d691..8205af3 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
@@ -52,6 +52,9 @@
             ohostedcons.VMEnv.VM_PASSWD,
             self._generateTempVncPassword()
         )
+        self.environment[otopicons.CoreEnv.LOG_FILTER_KEYS].append(
+            ohostedcons.VMEnv.VM_PASSWD
+        )
         self.environment.setdefault(
             ohostedcons.VMEnv.VM_PASSWD_VALIDITY_SECS,
             ohostedcons.Defaults.DEFAULT_VM_PASSWD_VALIDITY_SECS


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92ef0a1516d7a6dd70d3fd53ceac3c71ce1eaf24
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to