r/openstack • u/Sorecchione07 • Sep 28 '26
Manila Generic driver: SSH works manually, but service instance setup times out after 300s
Hi everyone,
I'm troubleshooting an OpenStack Manila deployment using the Generic driver with driver_handles_share_servers = True.
Manila successfully creates the service instance, but the share creation eventually fails with:
manila.exception.ServiceInstanceException:
SSH connection has not been established to 10.254.0.7 in 300s. Giving up.The interesting part is that SSH from the Manila service user works correctly.
Manila configuration
Relevant configuration:
[DEFAULT]
transport_url = rabbit://openstack:***@192.168.246.138
auth_strategy = keystone
rootwrap_config = /etc/manila/rootwrap.conf
[generic]
driver_handles_share_servers = True
connect_share_server_to_tenant_network = True
service_image_name = manila-service-image
service_instance_user = manila
path_to_private_key = /etc/manila/ssh/id_manilaThe backend is enabled with:
enabled_share_backends = genericService instance
Manila creates this Nova instance:
ID: 9b992d75-fdef-4bf7-9507-6f5677605921
Name: generic_19be5f70-81d0-436f-96d9-0f048c59bef2
Status: ACTIVE
Image: manila-service-image
Flavor: manila-service-flavorIt has:
internal 10.0.0.76
manila_service_network 10.254.0.7The service network is:
10.254.0.0/28and the Manila service VM has:
ens3 = 10.0.0.76/24
ens4 = 10.254.0.7/28Manual SSH test
Running the SSH command as the manila user from the Manila host works:
sudo -u manila ssh \
-o BatchMode=yes \
-o IdentitiesOnly=yes \
-o ConnectTimeout=5 \
-i /etc/manila/ssh/id_manila \
manila@10.254.0.7 \
'echo SSH_OK'Result:
SSH_OKExit status:
0The verbose SSH output confirms:
Authenticated to 10.254.0.7 ([10.254.0.7]:22) using "publickey".The server accepts exactly the same public key:
Server accepts key: /etc/manila/ssh/id_manilaI also tested sudo:
sudo -u manila ssh \
-o BatchMode=yes \
-o IdentitiesOnly=yes \
-i /etc/manila/ssh/id_manila \
manila@10.254.0.7 \
'sudo -n true; echo sudo_rc=$?'Result:
sudo_rc=0So basic networking, SSH authentication and sudo appear to be working.
Manila failure
However, during share creation Manila waits for 300 seconds and then reports:
Creation of share instance 8c35322d-0961-4372-b199-00b00d207bcf failed:
failed to get share server.:
manila.exception.ServiceInstanceException:
SSH connection has not been established to 10.254.0.7 in 300s. Giving up.The traceback points to:
manila/share/drivers/generic.py
_setup_server()
manila/share/drivers/service_instance.py
set_up_service_instance()The failure ultimately comes from:
service_instance.py
set_up_service_instance()What makes this confusing
The service instance is ACTIVE and reachable.
SSH works manually from the exact manila Unix user using the configured private key.
I also tried an older Manila service image, and the same problem occurs.
So I'm wondering whether there is a problem/bug in the Generic driver's service_instance.py SSH connection/wait logic, or whether Manila is checking something different from the SSH test above.
Has anyone seen this behavior before?
In particular, I'd like to understand what exactly set_up_service_instance() considers an "SSH connection established" and what conditions could cause it to wait the full 300 seconds even though a direct SSH connection succeeds.
Any pointers on where to look in the Manila code would be appreciated.
Thanks!
1
u/Eldiabolo18 Sep 28 '26
I've just run into this. This seems to be something in 20261.
The problem is the SSH-Key service in the service-VM. It tries for 300 secs to retrieve an SSH-Key and times out. Only after that (or on success of the service) is the SSH-Server available. The problem is, the timeout for the manila-share service is also 300s, so it just gives up on the Manila-VM at the same time.
One solution is to increase the build timeout in the manila.conf:
This still means it takes more than 5 mins to spawn a share-VM.
The other solution is to use private and public keys. You seem to want to do that, but its not working, which is why the ssh-keys service is timing out.
I believe its not working because your config only has
path_to_private_key, it also needspath_to_public_key. And the keys (priv and pub) must be on the host which has the manila-share service.3
u/Felix_Sanz_Gonzalez Sep 29 '26
Hola,
Hace unos meses abrí un par de bugs reportando este error. También nos afecta en nuestro despliegue de OpenStack 2026.1 (desplegado con Kolla-Ansible).
Podeís encontrar los bugs aqui:
https://bugs.launchpad.net/manila-image-elements/+bug/2166449
Relacionado: https://bugs.launchpad.net/kolla-ansible/+bug/2166451
En nuestro caso, optamos por crear a mano las claves SSH que la imagen de Manila parece esperar y cambiamos la configuración de Kolla Ansible para montarlas en los contenedores de Manila.
1
u/MisterJaerico Sep 29 '26
Check for clout-init logs in VM. Booting VM should not take that much time.
0
u/Sorecchione07 Sep 29 '26 edited Sep 29 '26
Manila Generic Driver – SSH authentication failure
I retried the Manila deployment using the new SSH key suggested by Eldiabolo18. The DHSS share VM now takes longer to fail, and the logs show some additional information.
1. SSH connection reaches the VM, but public-key authentication fails
manila-share.logshows that Paramiko successfully connects to the service VM:After several authentication attempts, Paramiko also reports:
Eventually Manila fails with:
The banner errors appear to be a secondary issue caused by repeated connection attempts, rather than the primary authentication failure.
2. Password SSH access works
SSH to the service VM using password authentication succeeds:
The
manilauser therefore exists andsshdis reachable.However:
There is no
authorized_keysfile.3. Manila is using the expected private key
The Manila node is configured with:
Verbose SSH confirms that the private key is loaded and actually offered:
Thus the client-side key is present and functional. The remote SSH server rejects the corresponding public key.
4. OpenStack keypair and Manila key match
The Nova keypair is:
The public key configured on the Manila node has exactly the same fingerprint:
The service instance is also explicitly using:
Therefore, there is no apparent mismatch between the key configured in Manila and the OpenStack keypair attached to the VM.
5. Config Drive contains the public key
The VM has an attached config-drive:
After mounting it,
openstack/latest/meta_data.jsoncontains:The same key is also present in the
keyssection:This is important because it proves that Nova/OpenStack is putting the expected public key into the VM's config-drive.
However, the running VM still has no:
The current evidence therefore looks like:
6. Cloud-init should not yet be assumed to be responsible
The service VM does not have the
cloud-initcommand:Therefore, there is currently no evidence that cloud-init is the component responsible for processing this image's config-drive.
The important next question is:
Which initialization mechanism in
manila-service-imageconsumes the OpenStack metadata and installs the SSH key for themanilauser?Possible areas to investigate are:
authorized_keys;manila-servicekey is intended for a different user;7. SSH MaxStartups throttling
The VM's
sshdlog also contains:This can explain some of Paramiko's:
because connections may be dropped before the SSH protocol exchange completes.
However, this appears to be separate from the public-key authentication problem: normal SSH connections reach
sshd, key exchange succeeds, and the offered key is explicitly rejected.8. Security Group and network connectivity
The service instance has the
manila-serviceSecurity Group attached, and its rules allow TCP/22.This is also confirmed by:
Therefore, the Security Group/network path is not preventing SSH access.
9. Comparison with previous deployments
The same
manila-service-imagewas previously used with Ubuntu 24.04/Noble and OpenStack Caracal/Epoxy.Those deployments exhibited a similar SSH authentication problem. It was resolved by explicitly setting:
The current deployment already has both settings.
This makes the current situation particularly interesting: the key configuration is present, the OpenStack keypair is correct, the fingerprint matches, the VM is reachable, and the public key is present in the config-drive, but it is not installed into the
manilauser'sauthorized_keys.Current conclusion
The investigation has largely ruled out:
The strongest remaining hypothesis is an initialization/provisioning problem inside
manila-service-image.The next step should therefore be to inspect the image itself for the mechanism that processes the OpenStack config-drive and creates
/home/manila/.ssh/authorized_keys, rather than changing the Manila SSH key configuration again.Solution found and problem solved!
The root cause was the fetch-public-ssh-keys.service systemd service included/enabled in the manila-service-image. When enabled, the service interfered with SSH public-key authentication for the manila user. The OpenStack keypair, Manila private/public key configuration, Config Drive, network connectivity, and Security Group were all correct. Disabling fetch-public-ssh-keys.service in the service image restored SSH public-key authentication, and the share could then be successfully created with service_instance_password disabled.