Ran locally, worked.
Details
Details
Diff Detail
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Ran locally, worked.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | libtaskotron/minion.py (4 lines) |
| Commit | Tree | Parents | Author | Summary | Date |
|---|---|---|---|---|---|
| 3ed2aab4906a | c4ed531cf09f | 3fa74847d919 | Martin Krizek | Rename taskotron-initiator.log to taskotron-overlord.log (Show More…) | Dec 15 2015, 8:52 AM |
| Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | |||||
| 114 | 114 | | |||
| 115 | class PersistentMinion(BaseMinion): | 115 | class PersistentMinion(BaseMinion): | ||
| 116 | '''Minion class that connects to alredy running machine using SSH and runs the task there. | 116 | '''Minion class that connects to alredy running machine using SSH and runs the task there. | ||
| 117 | ''' | 117 | ''' | ||
| 118 | 118 | | |||
| 119 | def execute(self): | 119 | def execute(self): | ||
| 120 | '''Init environment and connect to remote machine for task execution.''' | 120 | '''Init environment and connect to remote machine for task execution.''' | ||
| 121 | 121 | | |||
| 122 | filelog_path = os.path.join(self.uuid_dir, 'taskotron-initiator.log') | 122 | filelog_path = os.path.join(self.uuid_dir, 'taskotron-overlord.log') | ||
| 123 | logger.add_filehandler(filelog_path=filelog_path, remove_mem_handler=True) | 123 | logger.add_filehandler(filelog_path=filelog_path, remove_mem_handler=True) | ||
| 124 | 124 | | |||
| 125 | stdio_filename = os.path.join(self.uuid_dir, 'taskotron-stdio.log') | 125 | stdio_filename = os.path.join(self.uuid_dir, 'taskotron-stdio.log') | ||
| 126 | 126 | | |||
| 127 | log.info("Running task over SSH on machine '%s'...", self.machine) | 127 | log.info("Running task over SSH on machine '%s'...", self.machine) | ||
| 128 | 128 | | |||
| 129 | with remote_exec.ParamikoWrapper(self.machine, self.port, self.user, | 129 | with remote_exec.ParamikoWrapper(self.machine, self.port, self.user, | ||
| 130 | self.ssh_privkey, stdio_filename) as self.ssh: | 130 | self.ssh_privkey, stdio_filename) as self.ssh: | ||
| 131 | self._prepare_task() | 131 | self._prepare_task() | ||
| 132 | self._run() | 132 | self._run() | ||
| 133 | self._get_output() | 133 | self._get_output() | ||
| 134 | 134 | | |||
| 135 | 135 | | |||
| 136 | class DisposableMinion(BaseMinion): | 136 | class DisposableMinion(BaseMinion): | ||
| 137 | '''Minion class that creates a disposable client, connects to it over SSH and runs the task | 137 | '''Minion class that creates a disposable client, connects to it over SSH and runs the task | ||
| 138 | there. | 138 | there. | ||
| 139 | ''' | 139 | ''' | ||
| 140 | 140 | | |||
| 141 | def execute(self): | 141 | def execute(self): | ||
| 142 | '''Init environment and connect to disposable client for task execution.''' | 142 | '''Init environment and connect to disposable client for task execution.''' | ||
| 143 | 143 | | |||
| 144 | filelog_path = os.path.join(self.uuid_dir, 'taskotron-initiator.log') | 144 | filelog_path = os.path.join(self.uuid_dir, 'taskotron-overlord.log') | ||
| 145 | logger.add_filehandler(filelog_path=filelog_path, remove_mem_handler=True) | 145 | logger.add_filehandler(filelog_path=filelog_path, remove_mem_handler=True) | ||
| 146 | 146 | | |||
| 147 | stdio_filename = os.path.join(self.uuid_dir, 'taskotron-stdio.log') | 147 | stdio_filename = os.path.join(self.uuid_dir, 'taskotron-stdio.log') | ||
| 148 | 148 | | |||
| 149 | execution_ok = False | 149 | execution_ok = False | ||
| 150 | try: | 150 | try: | ||
| 151 | log.info("Running task on a disposable client using libvirt...") | 151 | log.info("Running task on a disposable client using libvirt...") | ||
| 152 | 152 | | |||
| Show All 35 Lines | |||||