rejoin-instance action should have "address" parameter mandatory

Bug #1952615 reported by Martin Kalcok
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL InnoDB Cluster Charm
Fix Released
Medium
Liam Young

Bug Description

Currently it's possible to run "rejoin-instance" action without specifying "address" parameter, resulting in following error:

unit-mysql-innodb-cluster-0:
  UnitId: mysql-innodb-cluster/0
  id: "14"
  message: Rejoin instance failed
  results:
    output: "Cannot set LC_ALL to locale en_US.UTF-8: No such file or directory\n\e[31mERROR:
      \e[0mUnable to connect to the target instance 'None'. Please verify the connection
      settings, make sure the instance is available and try again.\nTraceback (most
      recent call last):\n File \"<string>\", line 3, in <module>\nmysqlsh.DBError:
      MySQL Error (2005): Cluster.rejoin_instance: Could not open connection to 'None':
      Unknown MySQL server host 'None' (11)\n"
    traceback: |
      Traceback (most recent call last):
        File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/charm/actions/rejoin-instance", line 231, in rejoin_instance
          output = instance.rejoin_instance(address)
        File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/charm/lib/charm/openstack/mysql_innodb_cluster.py", line 938, in rejoin_instance
          raise e
        File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/charm/lib/charm/openstack/mysql_innodb_cluster.py", line 926, in rejoin_instance
          output = self.run_mysqlsh_script(_script).decode("UTF-8")
        File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/charm/lib/charm/openstack/mysql_innodb_cluster.py", line 1659, in run_mysqlsh_script
          return subprocess.check_output(cmd, stderr=subprocess.PIPE)
        File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/usr/lib/python3.8/subprocess.py", line 516, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['/snap/bin/mysqlsh', '--no-wizard', '--python', '-f', '/root/snap/mysql-shell/common/tmp3z92uc2y.py']' returned non-zero exit status 1.
  status: failed

Liam Young (gnuoy)
Changed in charm-mysql-innodb-cluster:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Liam Young (gnuoy)
milestone: none → 22.04
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-mysql-innodb-cluster (master)
Changed in charm-mysql-innodb-cluster:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-mysql-innodb-cluster (master)

Reviewed: https://review.opendev.org/c/openstack/charm-mysql-innodb-cluster/+/821976
Committed: https://opendev.org/openstack/charm-mysql-innodb-cluster/commit/7dd34067e0b453558c8100eed58c14a3d9f3e073
Submitter: "Zuul (22348)"
Branch: master

commit 7dd34067e0b453558c8100eed58c14a3d9f3e073
Author: Liam Young <email address hidden>
Date: Thu Dec 16 13:23:32 2021 +0000

    Enforce mandatory address action parametre

    Change-Id: I741c77dd9954608c397fdfe18d55c9f3d70f4dfe
    Closes-Bug: #1952615

Changed in charm-mysql-innodb-cluster:
status: In Progress → Fix Committed
Changed in charm-mysql-innodb-cluster:
status: Fix Committed → Fix Released
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.