From 0d7785f23398183d3cc3d023d0f362a942298b6e Mon Sep 17 00:00:00 2001 From: Billy Olsen Date: Mon, 26 Apr 2021 22:20:33 -0700 Subject: [PATCH] Fix snapcraft build issues The latest version of snapcraft fails to build microstack. Chasing it down is due to multiple staged parts which have conflicting information. Fixing that bit causes the uwsgi services not to run correctly. This patch fixes the uwsgi services by no longer overriding the python home directory, since python3 is staged into the snap we can use the default python home. This patch also removes the libc6 staging into the package, which should generally be avoided. Change-Id: I8c176689083831a0b8b56a192a9fbdfb50edbb66 --- snap-overlay/templates/cinder-api.ini.j2 | 1 - snap-overlay/templates/cluster-api.ini.j2 | 1 - snap-overlay/templates/horizon.ini.j2 | 1 - snap-overlay/templates/keystone-api.ini.j2 | 1 - snap-overlay/templates/placement-api.ini.j2 | 1 - snapcraft.yaml | 25 ++++----------------- 6 files changed, 4 insertions(+), 26 deletions(-) diff --git a/snap-overlay/templates/cinder-api.ini.j2 b/snap-overlay/templates/cinder-api.ini.j2 index 99af8f5..5f17f64 100644 --- a/snap-overlay/templates/cinder-api.ini.j2 +++ b/snap-overlay/templates/cinder-api.ini.j2 @@ -7,5 +7,4 @@ enable-threads = true processes = 4 thunder-lock = true lazy-apps = true -home = {{ snap }}/usr pyargv = {{ pyargv }} diff --git a/snap-overlay/templates/cluster-api.ini.j2 b/snap-overlay/templates/cluster-api.ini.j2 index 1963d6d..a7203f9 100644 --- a/snap-overlay/templates/cluster-api.ini.j2 +++ b/snap-overlay/templates/cluster-api.ini.j2 @@ -7,5 +7,4 @@ enable-threads = true processes = 2 thunder-lock = true lazy-apps = true -home = {{ snap }}/usr pyargv = {{ pyargv }} diff --git a/snap-overlay/templates/horizon.ini.j2 b/snap-overlay/templates/horizon.ini.j2 index 76e5ad7..4de0fe5 100644 --- a/snap-overlay/templates/horizon.ini.j2 +++ b/snap-overlay/templates/horizon.ini.j2 @@ -7,5 +7,4 @@ enable-threads = true processes = 4 thunder-lock = true lazy-apps = true -home = {{ snap }}/usr pyargv = {{ pyargv }} diff --git a/snap-overlay/templates/keystone-api.ini.j2 b/snap-overlay/templates/keystone-api.ini.j2 index 6072a39..d994124 100644 --- a/snap-overlay/templates/keystone-api.ini.j2 +++ b/snap-overlay/templates/keystone-api.ini.j2 @@ -7,5 +7,4 @@ enable-threads = true processes = 4 thunder-lock = true lazy-apps = true -home = {{ snap }}/usr pyargv = {{ pyargv }} diff --git a/snap-overlay/templates/placement-api.ini.j2 b/snap-overlay/templates/placement-api.ini.j2 index 9df593d..f50b726 100644 --- a/snap-overlay/templates/placement-api.ini.j2 +++ b/snap-overlay/templates/placement-api.ini.j2 @@ -7,5 +7,4 @@ enable-threads = true processes = 4 thunder-lock = true lazy-apps = true -home = {{ snap }}/usr pyargv = {{ pyargv }} diff --git a/snapcraft.yaml b/snapcraft.yaml index 338ebac..d3cedd5 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -658,7 +658,6 @@ parts: # OpenStack Python Projects, keyed off Keystone openstack-projects: plugin: python - # python-version: python3 after: - uca-sources - libvirt @@ -682,9 +681,11 @@ parts: - haproxy - libglib2.0-0 - libmagic1 - - petname - - libsystemd0 - libpython3.8 + - libssl-dev + - libsystemd0 + - petname + - python3 - spice-html5 - sg3-utils # LIO userspace dependencies @@ -1423,9 +1424,6 @@ parts: - ${SNAPCRAFT_STAGE}/patches/upper-constraints.txt source: tools/init stage-packages: - # note(dmitriis) in order to avoid conflicts about lib64/ld-linux-x86-64.so.2 - # with other parts. - - libc6 - rsync python-packages: - pip==20.0.2 @@ -1454,10 +1452,6 @@ parts: constraints: - ${SNAPCRAFT_STAGE}/patches/upper-constraints.txt source: tools/launch - stage-packages: - # note(dmitriis) in order to avoid conflicts about lib64/ld-linux-x86-64.so.2 - # with other parts. - - libc6 python-packages: - pip==20.0.2 - setuptools==44.0.0 @@ -1477,10 +1471,6 @@ parts: microstack: plugin: python source: tools/microstack - stage-packages: - # note(dmitriis) in order to avoid conflicts about lib64/ld-linux-x86-64.so.2 - # with other parts. - - libc6 python-packages: - pip==20.0.2 - setuptools==44.0.0 @@ -1505,10 +1495,6 @@ parts: constraints: - ${SNAPCRAFT_STAGE}/patches/upper-constraints.txt source: tools/cluster - # note(dmitriis) in order to avoid conflicts about lib64/ld-linux-x86-64.so.2 - # with other parts. - stage-packages: - - libc6 python-packages: - pip==20.0.2 - setuptools==44.0.0 @@ -1534,9 +1520,6 @@ parts: organize: setup-lvm-loopdev: bin/setup-lvm-loopdev stage-packages: - # note(dmitriis) in order to avoid conflicts about lib64/ld-linux-x86-64.so.2 - # with other parts. - - libc6 # fallocate - util-linux # losetup