Skip to content
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

Upgrades broken #130

Closed
carlcsaposs-canonical opened this issue Apr 22, 2024 · 3 comments
Closed

Upgrades broken #130

carlcsaposs-canonical opened this issue Apr 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@carlcsaposs-canonical
Copy link
Contributor

carlcsaposs-canonical commented Apr 22, 2024

Upgrades broken by #93

Calls to workload.enable() and workload.disable() appear on main

self.disable()
super().upgrade(unit=unit, tls=tls)
if enabled:
logger.debug("Re-enabling MySQL Router service after upgrade")
self.enable(tls=tls, unit_name=unit.name)

but workload.enable() and workload.disable() removed in #93

Causes error:

unit-mysql-router-2: 11:25:29 ERROR unit.mysql-router/2.juju-log upgrade-version-a:5: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/./src/machine_charm.py", line 117, in <module>
    ops.main.main(MachineSubordinateRouterCharm)
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/venv/ops/main.py", line 441, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/venv/ops/main.py", line 149, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/venv/ops/framework.py", line 344, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/venv/ops/framework.py", line 841, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/venv/ops/framework.py", line 930, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/src/abstract_charm.py", line 252, in reconcile
    self._upgrade.upgrade_unit(
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/src/machine_upgrade.py", line 150, in upgrade_unit
    workload_.upgrade(unit=self._unit, tls=tls)
  File "/var/lib/juju/agents/unit-mysql-router-2/charm/src/workload.py", line 398, in upgrade
    self.disable()
AttributeError: 'AuthenticatedSocketWorkload' object has no attribute 'disable'
@carlcsaposs-canonical carlcsaposs-canonical added the bug Something isn't working label Apr 22, 2024
Copy link
Contributor

@carlcsaposs-canonical
Copy link
Contributor Author

@taurus-forever FYI

shayancanonical added a commit that referenced this issue Apr 24, 2024
…elated to data-integrator + TLS support (#119)

## Issue
1. We are currently not reacting to `external-node-connectivity` that
may be sent to mysql-router via data-interfaces when related with
data-integrator
2. We are not able to relate with the TLS operators
3. We broke upgrades
(#130) when we
implemented reconcile pattern for COS

## Solution
1. Support `external-node-connectivity` by binding to address `0.0.0.0`
when related to data-integrator. Else, only expose router through a unix
socket
2. Add capability to relate to TLS operators
3. Refactor to fix upgrades -- remaining integration test will be added
in a follow up PR

## Testing
Added integration tests for TLS + COS, TLS, and TLS + Data Integrator

## todo
~~Change the `charmed-mysql` snap version to the official `8.0/edge`
version instead of a branch build~~
@shayancanonical
Copy link
Contributor

resolved in #119 and added tests in #135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants