aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArif Ali <arif.ali@canonical.com>2023-11-18 15:36:33 +0000
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2023-11-26 12:26:43 -0500
commit2e6ca7bf5fb8f88f0f59b864e87258ad67b598e4 (patch)
treebede9b64f65d591d56994c16386a6037f0aac44c
parent877920607889ff6828b7f41be90b3a9d027444bb (diff)
downloadsos-2e6ca7bf5fb8f88f0f59b864e87258ad67b598e4.tar.gz
[deb][pkg] Update control for downstream build
* python3-setuptools is still required for building the package * python3-yaml is required for build for tests with the conformance_tests * Add the same ignores as dowstream build, so that we don't have to keep changing these. Once the avocado is packaged, we can take this out * Update image for the deb creation, so that it can be minimal * Fix lxd runtime, so that if the root device is not available, it will not look at the storage pools Downstream build machines are much more minimal compared to gce instances, so we require more dependencies to be added. Signed-off-by: Arif Ali <arif.ali@canonical.com>
-rw-r--r--.cirrus.yml3
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules2
-rw-r--r--sos/policies/runtimes/lxd.py3
4 files changed, 7 insertions, 3 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 0971c84f..3766220f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -28,6 +28,7 @@ env:
DEBIAN_IMAGE_NAME: "debian-11-bullseye-v20230809"
FEDORA_IMAGE_NAME: "fedora-cloud-base-gcp-38-1-6-x86-64"
FEDORA_PRIOR_IMAGE_NAME: "fedora-cloud-base-gcp-37-1-7-x86-64"
+ UBUNTU_DEB_IMAGE_NAME: "ubuntu-minimal-2310-mantic-amd64-v20231030"
UBUNTU_LATEST_IMAGE_NAME: "ubuntu-2310-mantic-amd64-v20231031"
UBUNTU_IMAGE_NAME: "ubuntu-2204-jammy-v20231030"
UBUNTU_PRIOR_IMAGE_NAME: "ubuntu-2004-focal-v20231101"
@@ -123,7 +124,7 @@ deb_build_task:
name: "deb Build From Checkout"
gce_instance:
image_project: "${UBUNTU_PROJECT}"
- image_name: "${UBUNTU_LATEST_IMAGE_NAME}"
+ image_name: "${UBUNTU_DEB_IMAGE_NAME}"
type: e2-medium
setup_script: |
apt update --allow-releaseinfo-change
diff --git a/debian/control b/debian/control
index fe68fde4..0ca62874 100644
--- a/debian/control
+++ b/debian/control
@@ -10,10 +10,12 @@ Build-Depends:
python3-all,
python3-coverage,
python3-nose,
+ python3-setuptools,
python3-sphinx,
python3-magic,
python3-pexpect,
python3-packaging,
+ python3-yaml,
Homepage: https://github.com/sosreport/sos
Vcs-Browser: https://salsa.debian.org/sosreport-team/sosreport
Vcs-Git: https://salsa.debian.org/sosreport-team/sosreport.git
diff --git a/debian/rules b/debian/rules
index 79b75aad..7a889d24 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,4 +12,4 @@ override_dh_install:
rm -rf debian/sosreport/usr/config
override_dh_auto_test:
- nosetests3 -v --with-cover --cover-package=sos tests/unittests
+ nosetests3 -v --with-cover --cover-package=sos tests/unittests --ignore-files="policy_tests\.py"
diff --git a/sos/policies/runtimes/lxd.py b/sos/policies/runtimes/lxd.py
index 715514d6..2d0b5b48 100644
--- a/sos/policies/runtimes/lxd.py
+++ b/sos/policies/runtimes/lxd.py
@@ -94,7 +94,8 @@ class LxdContainerRuntime(ContainerRuntime):
if out['status'] == 0:
out_json = json.loads(out['output'])
for profile in out_json:
- if profile['name'] == 'default':
+ if (profile['name'] == 'default' and
+ 'root' in profile['devices']):
stg_pool = profile['devices']['root']['pool']
break