diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-04-25 19:50:37 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-04-25 19:50:37 +0000 |
| commit | db136ae87d8f5e2fae0e2212c7d26a069db7e202 (patch) | |
| tree | a2637f21926d61d875f7d69830633b8120ac249d | |
| parent | f58fe27540e40af751d1ff77f04ec2b855138cc9 (diff) | |
| parent | b2247590ae422588db541f279c7b137e36ee836f (diff) | |
| download | nova-db136ae87d8f5e2fae0e2212c7d26a069db7e202.tar.gz nova-db136ae87d8f5e2fae0e2212c7d26a069db7e202.tar.xz nova-db136ae87d8f5e2fae0e2212c7d26a069db7e202.zip | |
Merge "Fixes bug 987335."
| -rw-r--r-- | nova/virt/libvirt/connection.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index b899cea61..af3379482 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -982,6 +982,7 @@ class LibvirtConnection(driver.ComputeDriver): self._chown_console_log_for_instance(instance['name']) data = self._flush_libvirt_console(pty) + console_log = self._get_console_log_path(instance_name) fpath = self._append_to_file(data, console_log) return libvirt_utils.load_file(fpath) @@ -1133,9 +1134,12 @@ class LibvirtConnection(driver.ComputeDriver): libvirt_utils.mkfs('swap', target) @staticmethod - def _chown_console_log_for_instance(instance_name): - console_log = os.path.join(FLAGS.instances_path, instance_name, - 'console.log') + def _get_console_log_path(instance_name): + return os.path.join(FLAGS.instances_path, instance_name, + 'console.log') + + def _chown_console_log_for_instance(self, instance_name): + console_log = self._get_console_log_path(instance_name) if os.path.exists(console_log): libvirt_utils.chown(console_log, os.getuid()) |
