Closed eumel8 closed 2 years ago
@eumel8 can you try to downgrade openstacksdk
==0.61.0
I suppose that it can be a problem
@lego963 result: No module named 'openstack.common'
otcextensions==0.26.3 works, otcextensions==0.27.0 is also broken (with openstacksdk==0.61.0)
Same behavior with openstack --os-cloud otc cce cluster show
.
Downgrading openstacksdk to 0.61.0 fixes the warning but I get the following warning:
root@78c4479bd56b:/# openstack --os-cloud otc cce cluster list
Configured hook otcextensions.sdk:load cannot be executed: No module named 'openstack.common'
+--------------------------------------+----------------+-----------+--------------+---------+--------------------------------------------------------------------------+
| ID | name | status | flavor | version | endpoint |
+--------------------------------------+----------------+-----------+--------------+---------+--------------------------------------------------------------------------+
| 295d49ec-88df-11ec-a392 | x-production | Available | cce.s2.large | v1.21 | https://295d49ec-88df-11ec-a392.cce.eu-de.otc.t-systems.com |
+--------------------------------------+----------------+-----------+--------------+---------+--------------------------------------------------------------------------+
root@78c4479bd56b:/# openstack --os-cloud otc cce cluster node create --availability-zone eu-de-03 --flavor s3.4xlarge.4 --network 8d9ae731-c1c3-4367-ad78 --ssh-key x-production-ssh --k8s-tag usage=worker --k8s-tag added=from_script --tag key=app,value=x --tag key=env,value=production --annotation keyname1=valuename1 x-production
Configured hook otcextensions.sdk:load cannot be executed: No module named 'openstack.common'
Running in docker using python 3.9.14, openstack-client 6.0.0 and otcextensions 0.28.1.
FROM python:3.9.14-slim-buster
RUN pip install openstacksdk==0.61.0 && \
pip install python-openstackclient && \
pip install otcextensions && \
mkdir -p ~/.config/openstack/ && \
COPY clouds.yaml /root/.config/openstack/clouds.yaml
RUN openstack --version
RUN openstack --os-cloud otc cce cluster list
@pdstefan can you pin python-openstackclient==5.8.0
?
python-openstackclient==5.8.0
Not good. Same behavior as previously mentioned (Configured hook otcextensions.sdk:load cannot be executed: No module named 'openstack.common'
)
After playing around with versions, I got back the original behavior:
root@25619c6f772a:/# openstack --os-cloud otc cce cluster node create --availability-zone eu-de-03 --flavor s3.4xlarge.4 --network 8d9ae731-c1c3-4367-ad78 --ssh-key x-production-ssh --k8s-tag usage=worker --k8s-tag added=from_script --tag key=app,value=x--tag key=env,value=production --annotation keyname1=valuename1 x-production
(('id', 'name', 'private_ip', 'public_ip', 'status', 'flavor', 'ssh_key', 'availability_zone', 'operating_system', 'root_volume_type', 'root_volume_size', 'data_volume_type_1', 'data_volume_size_1'), ('9ec1b9cc-48a2-11ed-9205-02550a100044', 'x-production-xjp85', None, None, None, 's3.4xlarge.4', 'x-production-ssh', 'eu-de-03', 'EulerOS 2.9', 'SATA', 40, 'SATA', 100))
Dockerfile:
FROM python:3.9.14-slim-buster
RUN pip install openstacksdk==0.61.0 && \
pip install python-openstackclient && \
pip install otcextensions==0.26.3 && \
mkdir -p ~/.config/openstack/ && \
COPY clouds.yaml /root/.config/openstack/clouds.yaml
RUN openstack --version
RUN openstack --os-cloud otc cce cluster list
Relevant output:
Removing intermediate container 7469a7b77011
---> 79bb97ab2c34
Step 3/5 : COPY clouds.yaml /root/.config/openstack/clouds.yaml
---> a7abcfac6d5c
Step 4/5 : RUN openstack --version
---> Running in fec1a6069b1e
openstack 6.0.0
Removing intermediate container fec1a6069b1e
---> f4741961d09c
Step 5/5 : RUN openstack --os-cloud otc cce cluster list
---> Running in 938f026cedab
+--------------------------------------+----------------+-----------+--------------+---------+--------------------------------------------------------------------------+
| ID | name | status | flavor | version | endpoint |
+--------------------------------------+----------------+-----------+--------------+---------+--------------------------------------------------------------------------+
| 295d49ec-88df-11ec-a392 | x-production | Available | cce.s2.large | v1.21 | https://295d49ec-88df-11ec-a392- .cce.eu-de.otc.t-systems.com |
+--------------------------------------+----------------+-----------+--------------+---------+--------------------------------------------------------------------------+
Removing intermediate container 938f026cedab
---> 712fe15d6e39
Successfully built 712fe15d6e39
Successfully tagged openstack-cli:latest
latest stable version is otcextensions==0.26.3 with openstacksdk==0.61.0, newest versions of sdk has bunch of changes which brakes the backward compatibility. Will try to update
@eumel8 fun fact that's we already fixed this on 0.99.0 version of sdk (https://github.com/opentelekomcloud/python-otcextensions/pull/309), and on 0.101.0 it again reproducible
@pdstefan @eumel8 try new release with latest's versions, should work
thx @anton-sidelnikov Are you sure this release is uploaded to pypi? The release job is marked with post_failure and I couldn't found it in the repo. https://zuul.otc-service.com/t/eco/builds?job_name=release-python&project=opentelekomcloud/python-otcextensions
In few minutes will be uploaded. We switched to Ansible 6 and it has bit different behavior for shebangs in the modules
yes , worked now:
otcextensions==0.28.2
openstacksdk==0.101.0
many thx @anton-sidelnikov @gtema
Confirmed working with latest openstacksdk and python-openstackclient.
FROM python:3.9.14-slim-buster
RUN apt update ; apt install git nano -y && \
pip install openstacksdk && \
pip install python-openstackclient && \
pip install git+https://github.com/opentelekomcloud/python-otcextensions@0.28.2 && \
mkdir -p ~/.config/openstack/
COPY clouds.yaml /root/.config/openstack/clouds.yaml
RUN openstack --version
RUN openstack --os-cloud otc cce cluster list
I tried a
openstack rds instance list
which failed withPython 3.8.9
Just wondering why it worked yesterday.