|
|
fce3c4 |
From 55a21b9ef43d596a797325379b8acd3100850b50 Mon Sep 17 00:00:00 2001
|
|
|
fce3c4 |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
fce3c4 |
Date: Sat, 10 Nov 2018 16:44:17 +0100
|
|
|
fce3c4 |
Subject: [PATCH] [composer] New plugin for lorax-composer
|
|
|
fce3c4 |
|
|
|
fce3c4 |
lorax-composer is an API server for building disk images using
|
|
|
fce3c4 |
Blueprints. The plugin collects composer config and logs and few
|
|
|
fce3c4 |
composer-cli command outputs.
|
|
|
fce3c4 |
|
|
|
fce3c4 |
Resolves: #1477
|
|
|
fce3c4 |
|
|
|
fce3c4 |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
fce3c4 |
---
|
|
|
fce3c4 |
sos/plugins/composer.py | 39 +++++++++++++++++++++++++++++++++++++++
|
|
|
fce3c4 |
1 file changed, 39 insertions(+)
|
|
|
fce3c4 |
create mode 100644 sos/plugins/composer.py
|
|
|
fce3c4 |
|
|
|
fce3c4 |
diff --git a/sos/plugins/composer.py b/sos/plugins/composer.py
|
|
|
fce3c4 |
new file mode 100644
|
|
|
fce3c4 |
index 000000000..34901bcee
|
|
|
fce3c4 |
--- /dev/null
|
|
|
fce3c4 |
+++ b/sos/plugins/composer.py
|
|
|
fce3c4 |
@@ -0,0 +1,39 @@
|
|
|
fce3c4 |
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
|
|
|
fce3c4 |
+
|
|
|
fce3c4 |
+
|
|
|
fce3c4 |
+class Composer(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
fce3c4 |
+ """Lorax Composer
|
|
|
fce3c4 |
+ """
|
|
|
fce3c4 |
+
|
|
|
fce3c4 |
+ plugin_name = 'composer'
|
|
|
fce3c4 |
+ profiles = ('sysmgmt', 'virt', )
|
|
|
fce3c4 |
+
|
|
|
fce3c4 |
+ packages = ('composer-cli',)
|
|
|
fce3c4 |
+
|
|
|
fce3c4 |
+ def _get_blueprints(self):
|
|
|
fce3c4 |
+ blueprints = []
|
|
|
fce3c4 |
+ bp_result = self.get_command_output("composer-cli blueprints list")
|
|
|
fce3c4 |
+ if bp_result['status'] != 0:
|
|
|
fce3c4 |
+ return blueprints
|
|
|
fce3c4 |
+ for line in bp_result['output'].splitlines():
|
|
|
fce3c4 |
+ blueprints.append(line)
|
|
|
fce3c4 |
+ return blueprints
|
|
|
fce3c4 |
+
|
|
|
fce3c4 |
+ def setup(self):
|
|
|
fce3c4 |
+ self.add_copy_spec([
|
|
|
fce3c4 |
+ "/etc/lorax/composer.conf",
|
|
|
fce3c4 |
+ "/var/log/lorax-composer/composer.log"
|
|
|
fce3c4 |
+ "/var/log/lorax-composer/dnf.log"
|
|
|
fce3c4 |
+ "/var/log/lorax-composer/program.log"
|
|
|
fce3c4 |
+ "/var/log/lorax-composer/server.log"
|
|
|
fce3c4 |
+ ])
|
|
|
fce3c4 |
+ blueprints = self._get_blueprints()
|
|
|
fce3c4 |
+ for blueprint in blueprints:
|
|
|
fce3c4 |
+ self.add_cmd_output("composer-cli blueprints show %s" % blueprint)
|
|
|
fce3c4 |
+
|
|
|
fce3c4 |
+ self.add_cmd_output([
|
|
|
fce3c4 |
+ "composer-cli blueprints list",
|
|
|
fce3c4 |
+ "composer-cli sources list"
|
|
|
fce3c4 |
+ ])
|
|
|
fce3c4 |
+
|
|
|
fce3c4 |
+# vim: set et ts=4 sw=4 :
|
|
|
fce3c4 |
From 7907bb4fbb3279d61d30d46372bc729557a5049a Mon Sep 17 00:00:00 2001
|
|
|
fce3c4 |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
fce3c4 |
Date: Thu, 10 Jan 2019 15:18:04 +0100
|
|
|
fce3c4 |
Subject: [PATCH] [composer] add missing commas in list in add_copy_spec
|
|
|
fce3c4 |
|
|
|
fce3c4 |
Resolves: #1535
|
|
|
fce3c4 |
|
|
|
fce3c4 |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
fce3c4 |
---
|
|
|
fce3c4 |
sos/plugins/composer.py | 8 ++++----
|
|
|
fce3c4 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
fce3c4 |
|
|
|
fce3c4 |
diff --git a/sos/plugins/composer.py b/sos/plugins/composer.py
|
|
|
fce3c4 |
index ff3aa49b..0f926398 100644
|
|
|
fce3c4 |
--- a/sos/plugins/composer.py
|
|
|
fce3c4 |
+++ b/sos/plugins/composer.py
|
|
|
fce3c4 |
@@ -22,10 +22,10 @@ class Composer(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
fce3c4 |
def setup(self):
|
|
|
fce3c4 |
self.add_copy_spec([
|
|
|
fce3c4 |
"/etc/lorax/composer.conf",
|
|
|
fce3c4 |
- "/var/log/lorax-composer/composer.log"
|
|
|
fce3c4 |
- "/var/log/lorax-composer/dnf.log"
|
|
|
fce3c4 |
- "/var/log/lorax-composer/program.log"
|
|
|
fce3c4 |
- "/var/log/lorax-composer/server.log"
|
|
|
fce3c4 |
+ "/var/log/lorax-composer/composer.log",
|
|
|
fce3c4 |
+ "/var/log/lorax-composer/dnf.log",
|
|
|
fce3c4 |
+ "/var/log/lorax-composer/program.log",
|
|
|
fce3c4 |
+ "/var/log/lorax-composer/server.log",
|
|
|
fce3c4 |
])
|
|
|
fce3c4 |
blueprints = self._get_blueprints()
|
|
|
fce3c4 |
for blueprint in blueprints:
|
|
|
fce3c4 |
--
|
|
|
fce3c4 |
2.17.2
|
|
|
fce3c4 |
|