Skip to content

Commit

Permalink
qa/tasks: pass a hostname to "host add"
Browse files Browse the repository at this point in the history
if orchestrator_cli uses cephadm as its backend, it will try to talk to
the remote host using ssh. but before this change, apparently, neither
"osd0" nor "mon0" is resolvable. that why we have

```
2020-01-29T22:49:16.187 INFO:tasks.ceph.mgr.x.smithi136.stderr:ssh: Could not resolve hostname osd0: Name or service not known
```

in the teuthology.log. and remoto throws an `execnet.gateway_bootstrap.HostNotFound`
exception in this case.

after this change, we always add localhost using "host add $hostname".

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Jan 31, 2020
1 parent ec2e53f commit 8c60b40
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions qa/tasks/mgr/test_cephadm_orchestrator.py
Expand Up @@ -16,8 +16,8 @@ def setUp(self):
self._orch_cmd("set", "backend", "cephadm")

def test_host_ls(self):
self._orch_cmd("host", "add", "osd0")
self._orch_cmd("host", "add", "mon0")
ret = self._orch_cmd("host", "ls")
self.assertIn("osd0", ret)
self.assertIn("mon0", ret)
remote = self.mgr_cluster.mon_manager.find_remote('osd', 1)
hostname = remote.hostname
self._orch_cmd("host", "add", hostname)
hosts = self._orch_cmd("host", "ls")
self.assertIn(hostname, hosts)

0 comments on commit 8c60b40

Please sign in to comment.