create-target action fails "No such path"

Bug #2039905 reported by Samuel Allan
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Ceph iSCSI Charm
Invalid
Undecided
Unassigned

Bug Description

Creating a target as described in the readme, using the create-target action, fails. For example:

```
juju run ceph-iscsi/leader create-target \
   client-initiatorname="$(sudo grep -e '^InitiatorName=' /etc/iscsi/initiatorname.iscsi | cut -f2 -d=)" \
   client-username=myuser \
   client-password=mypassword \
   image-size=50M \
   image-name=myimage2 \
   ec-rbd-metadata-pool=rbd \
   rbd-pool-name=rbd-data
```

Juju debug-log output:

```
unit-ceph-iscsi-3: 04:29:25 INFO unit.ceph-iscsi/3.juju-log gwcli /iscsi-targets/ ...
unit-ceph-iscsi-3: 04:29:26 INFO unit.ceph-iscsi/3.juju-log gwcli /iscsi-targets/iqn.2003-01.com.ubuntu.iscsi-gw:iscsi-igw/gateways/ ...
unit-ceph-iscsi-3: 04:29:27 INFO unit.ceph-iscsi/3.juju-log gwcli /iscsi-targets/iqn.2003-01.com.ubuntu.iscsi-gw:iscsi-igw/gateways/ ...
unit-ceph-iscsi-3: 04:29:28 INFO unit.ceph-iscsi/3.juju-log gwcli /disks ...
unit-ceph-iscsi-3: 04:29:30 INFO unit.ceph-iscsi/3.juju-log gwcli /iscsi-targets/iqn.2003-01.com.ubuntu.iscsi-gw:iscsi-igw/hosts/ ...
unit-ceph-iscsi-3: 04:29:31 INFO unit.ceph-iscsi/3.juju-log gwcli /iscsi-targets/iqn.2003-01.com.ubuntu.iscsi-gw:iscsi-igw/hosts/iqn.1993-08.org.debian:01:a4b5157f8afe ...
unit-ceph-iscsi-3: 04:29:31 ERROR unit.ceph-iscsi/3.juju-log gwcli failed with 255
unit-ceph-iscsi-3: 04:29:31 ERROR unit.ceph-iscsi/3.juju-log stdout: b''
unit-ceph-iscsi-3: 04:29:32 ERROR unit.ceph-iscsi/3.juju-log stderr: b'No such path /iscsi-targets/iqn.2003-01.com.ubuntu.iscsi-gw:iscsi-igw/hosts/iqn.1993-08.org.debian:01:a4b5157f8afe\n'
unit-ceph-iscsi-3: 04:29:32 ERROR unit.ceph-iscsi/3.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/./src/charm.py", line 589, in <module>
    main(ops_openstack.core.get_charm_class_for_release())
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/venv/ops/main.py", line 438, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/venv/ops/main.py", line 150, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/venv/ops/framework.py", line 355, in emit
    framework._emit(event) # noqa
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/venv/ops/framework.py", line 856, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/venv/ops/framework.py", line 931, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/./src/charm.py", line 567, in on_create_target_action
    gw_client.add_client_auth(
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/src/gwcli_client.py", line 53, in add_client_auth
    self.run(
  File "/var/lib/juju/agents/unit-ceph-iscsi-3/charm/src/gwcli_client.py", line 27, in run
    raise RuntimeError(error_msg)
RuntimeError: gwcli failed with 255
```

Revision history for this message
Samuel Allan (samuelallan) wrote :

For more information, I have the recommended 2 units deployed, and the charm status is active/idle. It's related to a working ceph-mon.

If I manually try to create the host that it's complaining is missing, I see this error:

```
/iscsi-target...csi-igw/hosts> create iqn.1993-08.org.debian:01:a4b5157f8afe
Failed: Clients can not be defined until a HA configuration has been defined (>2 gateways)
```

I'll investigate further for HA issues, but running `sudo gwcli ls` on each node results in:

first node (the one where I'm running the the action on - the ip address is the ip of that node):

```
...
  o- iscsi-targets ............................................................................... [DiscoveryAuth: None, Targets: 1]
    o- iqn.2003-01.com.ubuntu.iscsi-gw:iscsi-igw ......................................................... [Auth: None, Gateways: 1]
      o- disks .......................................................................................................... [Disks: 0]
      o- gateways ............................................................................................ [Up: 1/1, Portals: 1]
      | o- node-2.maas ...................................................................................... [192.168.151.128 (UP)]
      o- host-groups .................................................................................................. [Groups : 0]
      o- hosts ....................................................................................... [Auth: ACL_ENABLED, Hosts: 0]
```

And on the second node - the same exept for:

```
 | o- node-2.maas ................................................................................. [192.168.151.128 (UNKNOWN)]
```

And the second one also starts with a warning:

```
1 gateway is inaccessible - updates will be disabled
```

Revision history for this message
Nobuto Murata (nobuto) wrote :

It's likely a DNS issue in the end so I'm marking this as Incomplete for the time being.

Changed in charm-ceph-iscsi:
status: New → Incomplete
Revision history for this message
Samuel Allan (samuelallan) wrote :

Yep agreed, it's very unclear and the logs don't explain anything... but there appeared to be dns issues in my environment, and working dns for resolving nodes was listed as a prerequisite. Fine to close this.

Changed in charm-ceph-iscsi:
status: Incomplete → Invalid
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.