[groovy-victoria] "gwcli /iscsi-targets/ create ..." fails with 1, GatewayError

Bug #1904199 reported by Aurelien Lourot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Ceph iSCSI Charm
Invalid
Undecided
Unassigned
ceph-iscsi (Ubuntu)
New
Undecided
Unassigned

Bug Description

Visible here: https://review.opendev.org/#/c/761534/

AssertionError: Action 'create-target' exited with status 'failed': 'exit status 1'

INFO juju-log gwcli /iscsi-targets/ ...
ERROR juju-log gwcli failed with 1
ERROR juju-log stdout: b'Warning: Could not load preferences file /root/.gwcli/prefs.bin.\n\x1b[31;1mGatewayError: \x1b[0m\n'
ERROR juju-log stderr: b''
ERROR juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "./src/charm.py", line 551, in <module>
    main(ops_openstack.core.get_charm_class_for_release())
  File "/var/lib/juju/agents/unit-ceph-iscsi-1/charm/venv/ops/main.py", line 401, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-ceph-iscsi-1/charm/venv/ops/main.py", line 140, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-ceph-iscsi-1/charm/venv/ops/framework.py", line 234, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-ceph-iscsi-1/charm/venv/ops/framework.py", line 678, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-ceph-iscsi-1/charm/venv/ops/framework.py", line 723, in _reemit
    custom_handler(event)
  File "./src/charm.py", line 513, in on_create_target_action
    gw_client.create_target(target)
  File "/var/lib/juju/agents/unit-ceph-iscsi-1/charm/src/gwcli_client.py", line 30, in create_target
    self.run(
  File "/var/lib/juju/agents/unit-ceph-iscsi-1/charm/src/gwcli_client.py", line 27, in run
    raise RuntimeError(error_msg)
RuntimeError: gwcli failed with 1

Revision history for this message
Liam Young (gnuoy) wrote :

I don;t think this is a charm issue. It looks like an incompatibility between ceph-isci and python3-werkzeug in groovy.

# /usr/bin/rbd-target-api
 * Serving Flask app "rbd-target-api" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
Traceback (most recent call last):
  File "/usr/bin/rbd-target-api", line 2952, in <module>
    main()
  File "/usr/bin/rbd-target-api", line 2889, in main
    app.run(host=settings.config.api_host,
  File "/usr/lib/python3/dist-packages/flask/app.py", line 990, in run
    run_simple(host, port, self, **options)
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 1052, in run_simple
    inner()
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 996, in inner
    srv = make_server(
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 847, in make_server
    return ThreadedWSGIServer(
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 766, in __init__
    self.socket = ssl_context.wrap_socket(sock, server_side=True)
AttributeError: 'Context' object has no attribute 'wrap_socket'

Changed in charm-ceph-iscsi:
status: New → Invalid
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Could you also confirm if this is happening only in Groovy? I see the following versions of those two packages in case this is really an incompatibility issue:

$ rmadison ceph-iscsi
 ceph-iscsi | 3.4-0ubuntu2 | focal/universe | source, all
 ceph-iscsi | 3.4-0ubuntu2 | groovy/universe | source, all
 ceph-iscsi | 3.4-0ubuntu2 | hirsute/universe | source, all
$ rmadison python3-werkzeug
 python3-werkzeug | 0.16.1+dfsg1-2 | focal | all
 python3-werkzeug | 1.0.1+dfsg1-2 | groovy | all
 python3-werkzeug | 1.0.1+dfsg1-2 | hirsute | all

If Liam's assumption is correct it should not be working on Hirsute as well, and it might be working on Focal since there we have an older version of python3-werkzeug.

Revision history for this message
Liam Young (gnuoy) wrote :

I have tested focal and groovy and is only happening on groovy. I have not tried Hirsute.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.