Comment 3 for bug 2054470

Revision history for this message
Thiago Martins (martinx) wrote :

Hello, Sergio!

Thank you for your fast support!

Using `localhost` instead of `127.0.0.1` did the trick on Ubuntu 22.04! I haven't tested again on Ubuntu 20.04.

But I do remember seeing an issue with Ubuntu 20.04. But I think it might be related to the service not coming up on the system's boot. Look:

After booting the system, the NBD isn't running.

```
root@cephao-1-ceph-osd-1:~# systemctl status nbd@nbd0
○ <email address hidden> - NBD client connection for nbd0
     Loaded: loaded (/lib/systemd/system/nbd@.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:nbd-client

Feb 21 22:54:22 cephao-1-ceph-osd-1 systemd[1]: <email address hidden>: Dependency Before=dev-nbd0.device ignored (.device units cannot be delayed)
```

Then, after a restart, it works:

```
root@cephao-1-ceph-osd-1:~# systemctl restart nbd@nbd0
root@cephao-1-ceph-osd-1:~# systemctl status nbd@nbd0
● <email address hidden> - NBD client connection for nbd0
     Loaded: loaded (/lib/systemd/system/nbd@.service; enabled; vendor preset: enabled)
     Active: active (exited) since Wed 2024-02-21 22:57:37 UTC; 2s ago
       Docs: man:nbd-client
    Process: 1096 ExecStart=//sbin/nbd-client nbd0 (code=exited, status=0/SUCCESS)
   Main PID: 1096 (code=exited, status=0/SUCCESS)
        CPU: 4ms

Feb 21 22:57:37 cephao-1-ceph-osd-1 systemd[1]: Starting NBD client connection for nbd0...
Feb 21 22:57:37 cephao-1-ceph-osd-1 nbd-client[1096]: Negotiation: ..size = 3145728MB
Feb 21 22:57:37 cephao-1-ceph-osd-1 nbd-client[1096]: Connected /dev/nbd0
Feb 21 22:57:37 cephao-1-ceph-osd-1 systemd[1]: Finished NBD client connection for nbd0.
```

So this forces me to have the following `/etc/rc.local` file as a workaround:

```
#!/bin/bash
systemctl restart nbd@nbd0
```

I understand that this is a different issue but, worth mentioning here. And I do remember seeing this on Ubuntu 20.04... lol

Cheers!