Royce Lv has uploaded a new change for review.

Change subject: [WIP]clean authKey for managers
......................................................................

[WIP]clean authKey for managers

when authKey is omitted, it will use current_process().authKey,
and this key will be herited when using Process() to start child.
So no authKey manager is used for child/parent communication.

Change-Id: Iff8a8169d30fc12b212d550474ef18189b5acc8d
Signed-off-by:Royce Lv<[email protected]>
---
M vdsm/supervdsm.py
M vdsm/supervdsmServer.py
2 files changed, 2 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/11193/1

diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py
index 10abae0..0512e30 100644
--- a/vdsm/supervdsm.py
+++ b/vdsm/supervdsm.py
@@ -117,21 +117,6 @@
         for f in (self.pidfile, self.timestamp, self.address):
             utils.rmFile(f)
 
-    def _start(self):
-        self._authkey = str(uuid.uuid4())
-        self._log.debug("Launching Super Vdsm")
-
-        # we pass to svdsm filenames and uid. Svdsm will use those filenames
-        # to create its internal files and give to the passed uid the
-        # permissions to read those files.
-        superVdsmCmd = [constants.EXT_PYTHON, SUPERVDSM,
-                        self._authkey, str(os.getpid()),
-                        self.pidfile, self.timestamp, self.address,
-                        str(os.getuid())]
-
-        misc.execCmd(superVdsmCmd, sync=False, sudo=True)
-        sleep(2)
-
     def kill(self):
         try:
             with open(self.pidfile, "r") as f:
@@ -142,7 +127,6 @@
                             exc_info=True)
 
         self._cleanOldFiles()
-        self._authkey = None
         self._manager = None
         self._svdsm = None
         self._firstLaunch = True
@@ -179,8 +163,7 @@
             return False
 
     def _connect(self):
-        self._manager = _SuperVdsmManager(address=self.address,
-                                          authkey=self._authkey)
+        self._manager = _SuperVdsmManager(address=self.address)
         self._manager.register('instance')
         self._manager.register('open')
         self._log.debug("Trying to connect to Super Vdsm")
diff --git a/vdsm/supervdsmServer.py b/vdsm/supervdsmServer.py
index 77d2798..d789b4c 100755
--- a/vdsm/supervdsmServer.py
+++ b/vdsm/supervdsmServer.py
@@ -400,7 +400,7 @@
 
         try:
             log.debug("Creating remote object manager")
-            manager = _SuperVdsmManager(address=address, authkey=authkey)
+            manager = _SuperVdsmManager(address=address)
             manager.register('instance', callable=_SuperVdsm)
 
             server = manager.get_server()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff8a8169d30fc12b212d550474ef18189b5acc8d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to