Giter VIP home page Giter VIP logo

charm-cinder-oceanstor's People

Contributors

exceptorr avatar lolwww avatar nobuto-m avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

charm-cinder-oceanstor's Issues

Log flooded with `InsecureRequestWarning: Unverified HTTPS request is being made to host`

cinder-volume.log will be flooded with a TLS verification warning for every single REST call as follows:

2021-08-17 20:30:10.739 2076401 DEBUG oslo_concurrency.lockutils (...) Lock "huawei_cinder_call" acquired by "cinder.volume.drivers.huawei.rest_client.RestClient.call" :: waited 0.000s inner /usr/lib/python3/dist-packages/oslo_concurrency/lockutils.py:354
2021-08-17 20:30:10.740 2076401 WARNING py.warnings (...) /usr/lib/python3/dist-packages/urllib3/connectionpool.py:999: InsecureRequestWarning: Unverified HTTPS request is being made to host 'FQDN'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

It looks like the driver has a config around verification and it seems the default is False. We might want to tweak the config and similar ones to properly verify the cert as an enhancement from the current scheme.

https://github.com/openstack/cinder/blob/393c2e4ad90c05ebf28cc3a2c65811d7e1e0bc18/cinder/volume/drivers/huawei/huawei_conf.py#L144-L155

cinder-volume is restarted every 5 minutes

My gut feeling is that this code block should be conditioned when_not(update-status).

@charms.reactive.when_not('driver_init_configured')
@charms.reactive.when('storage-backend.available')
def driver_config():
charms.reactive.set_flag('config.changed')

$ journalctl -u cinder-volume.service
...
Jul 04 14:00:16 cloud-node-003 systemd[1]: Stopping OpenStack Cinder Volume...
Jul 04 14:00:16 cloud-node-003 systemd[1]: cinder-volume.service: Succeeded.
Jul 04 14:00:16 cloud-node-003 systemd[1]: Stopped OpenStack Cinder Volume.
Jul 04 14:00:16 cloud-node-003 systemd[1]: Started OpenStack Cinder Volume.
Jul 04 14:05:36 cloud-node-003 systemd[1]: Stopping OpenStack Cinder Volume...
Jul 04 14:05:36 cloud-node-003 systemd[1]: cinder-volume.service: Succeeded.
Jul 04 14:05:36 cloud-node-003 systemd[1]: Stopped OpenStack Cinder Volume.
Jul 04 14:05:36 cloud-node-003 systemd[1]: Started OpenStack Cinder Volume.
Jul 04 14:10:37 cloud-node-003 systemd[1]: Stopping OpenStack Cinder Volume...
Jul 04 14:10:37 cloud-node-003 systemd[1]: cinder-volume.service: Succeeded.
Jul 04 14:10:37 cloud-node-003 systemd[1]: Stopped OpenStack Cinder Volume.
Jul 04 14:10:37 cloud-node-003 systemd[1]: Started OpenStack Cinder Volume.

when iscsiinitiators is None, jinja2.exceptions.UndefinedError: 'None' has no attribute 'split'

iscsiinitiators is None by default. We can set ''(empty string) to the config in the bundle, but it's dangerous since if we run the bundle again, then it will reset iscsiinitiators to empty even if it's set by an operator.

unit-cinder-oceanstor-0: 09:17:06 INFO unit.cinder-oceanstor/0.juju-log storage-backend:227: Invoking reactive handler: reactive/cinder_oceanstor_handlers.py:47:render_config
unit-cinder-oceanstor-0: 09:17:06 ERROR unit.cinder-oceanstor/0.juju-log storage-backend:227: Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/charm/reactive/cinder_oceanstor_handlers.py", line 55, in render_config
    charm.render_with_interfaces(args)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 994, in render_with_interfaces
    self.render_configs(
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 975, in render_configs
    _render(os.path.basename(conf))
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 964, in _render
    charmhelpers.core.templating.render(
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charmhelpers/core/templating.py", line 85, in render
    content = template.render(context)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "templates/cinder_huawei_conf.xml", line 24, in <module>
    {% set initiators = options.iscsiinitiators.split(';') %}
jinja2.exceptions.UndefinedError: 'None' has no attribute 'split'

iscsid need to restart

What I deploy this charm along with cinder which runs on dedicated ceph nodes, I need to run "systemctl restart iscsid" to make server create boot from volume working.

`juju deploy cinder-oceanstor` fails with `self.config.get('username').strip()`

When a bundle is not used with per-populated configs, it fails at:

2021-09-10 01:33:52 INFO unit.cinder-oceanstor/0.juju-log server.go:325 storage-backend:2: Reactive main running for hook storage-backend-relation-joined
2021-09-10 01:33:52 ERROR unit.cinder-oceanstor/0.juju-log server.go:325 storage-backend:2: Unable to find implementation for relation: requires of juju-info
2021-09-10 01:33:52 INFO unit.cinder-oceanstor/0.juju-log server.go:325 storage-backend:2: Invoking reactive handler: hooks/relations/cinder-backend/provides.py:16:cinder_backend_joined
2021-09-10 01:33:52 INFO unit.cinder-oceanstor/0.juju-log server.go:325 storage-backend:2: Invoking reactive handler: reactive/cinder_oceanstor_handlers.py:45:driver_config
2021-09-10 01:33:52 INFO unit.cinder-oceanstor/0.juju-log server.go:325 storage-backend:2: Invoking reactive handler: reactive/layer_openstack.py:101:run_storage_backend
2021-09-10 01:33:52 ERROR unit.cinder-oceanstor/0.juju-log server.go:325 storage-backend:2: Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/charm/reactive/layer_openstack.py", line 105, in run_storage_backend
    instance.send_storage_backend_data()
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/classes.py", line 1095, in send_storage_backend_data
    configuration=self.cinder_configuration(),
  File "/var/lib/juju/agents/unit-cinder-oceanstor-0/charm/lib/charm/openstack/cinder_oceanstor.py", line 36, in cinder_configuration
    self.config['username'] = self.config.get('username').strip()
AttributeError: 'NoneType' object has no attribute 'strip'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.