-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement DEPRECATED mysql-shared
interface
#49
Conversation
f8bb24a
to
6a8e044
Compare
Traceback (most recent call last): File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/./src/machine_charm.py", line 59, in <module> ops.main.main(MachineSubordinateRouterCharm) File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/venv/ops/main.py", line 429, in main charm = charm_class(framework) File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/./src/machine_charm.py", line 28, in __init__ self._database_provides = relations.database_providers_wrapper.RelationEndpoint(self) File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/src/relations/database_providers_wrapper.py", line 32, in __init__ self._database_provides = relations.database_provides.RelationEndpoint(charm_) File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/src/relations/database_provides.py", line 149, in __init__ self._interface = data_interfaces.DatabaseProvides(charm_, relation_name=self._NAME) File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/lib/charms/data_platform_libs/v0/data_interfaces.py", line 756, in __init__ super().__init__(charm, relation_name) File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/lib/charms/data_platform_libs/v0/data_interfaces.py", line 373, in __init__ super().__init__(charm, relation_name) File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/venv/ops/framework.py", line 412, in __init__ self.framework._track(self) File "/var/lib/juju/agents/unit-mysqlrouter-0/charm/venv/ops/framework.py", line 661, in _track raise RuntimeError( RuntimeError: two objects claiming to be MachineSubordinateRouterCharm/DatabaseProvides[database] have been created from https://github.com/canonical/mysql-router-operator/actions/runs/5404925316/jobs/9819825535
peer relation not available in install event
578b9b4
to
069bcbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, one question. otherwise LGTM.
if isinstance(exception, exception_type): | ||
return exception.status | ||
if requested_users: | ||
return ops.ActiveStatus("'mysql-shared' interface deprecated") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a minor one, otherwise lgtm
self._local_unit_databag["allowed_units"] = self._remote_unit_name | ||
self._local_unit_databag["db_host"] = "127.0.0.1" | ||
self._local_unit_databag["db_port"] = "3306" | ||
self._local_unit_databag["wait_timeout"] = "3600" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this comes from mysql configuration
The legacy charm supports a config and default it to 3600, but since we are not supporting the config, we should reflect the sysvar default, i.e. 28800.
A task was added to mirror this on the vm charm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
mysql-router from 8.0/stable (written by OpenStack Charmers) supports mysql-shared interface
Add support for mysql-shared interface
DPE-2035