-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on filling openstack pool due new instance dont have mac address #116
Comments
Unfortunately, UDS needs the mac of the VM in order to allow to be configured. (In fact, the MAC or the IP, but some network related info that, with the template secret, will allow uds to identify vdi). The best way is simply wait for the MAC to be present, that is, is very easy to patch UDS to allow "delayed" network interface info, simply patching " File "/root/openuds/server/src/uds/services/OpenStack/service.py", line 265, in get_mac" to check if there are adresses and, if not, return empty string... As long as it has no unique id, should keep in. If it is something normal in OpenStack (i didn't see it before..), i can adapt the code to wait for the mac to be before assuming it has been created... Also, be care using v4.0 (master branch). It's in an unstable state right now. It will be released as beta probably in a couple of months, but it's not ready for overseed 3.6 on a production environment. |
I think this is typical behavior for openstack. I haven't double-checked how creating a virtual machine looks via API, but via UI it looks exactly like this. |
I have made a change for allowing this. If that is the case, that is, eventually after creating it, it will get a network card and be started correctly, this pull should solve your issues. Hope this helps, (Note the changes to the end of the commit) |
master
Exception when fill pool with the opentask live provider.
In our case instances obtains address in minutes later than vm created.
What is expected way for implements get_unique_id()?
Should we await mac address or can use any unique? i.e. instance uuid?
uds.core.managers.userservice_helpers.opchecker:state_updater 266 Checking service state
Traceback (most recent call last):
File "/root/openuds/server/src/uds/core/managers/userservice_helpers/opchecker.py", line 240, in state_updater
userservice.unique_id = userservice_instance.get_unique_id() # Updates uniqueId
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/openuds/server/src/uds/core/services/generics/dynamic/userservice.py", line 346, in get_unique_id
self._mac = self.service().get_mac(self, self._vmid) or ''
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/openuds/server/src/uds/services/OpenStack/service.py", line 265, in get_mac
return self.api.get_server_info(vmid).validated().addresses[0].mac
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
DEBUG 2024-09-24 15:50:00,178 uds.core.managers.userservice:locate_user_service 905 Found service: User service new service pool 2, unique_id , cache_level 0, user vic@new internal database auth (id:1), name , state Error:In preparation
ERROR 2024-09-24 15:50:00,179 uds.web.util.services:enable_service 470 Error
Traceback (most recent call last):
File "/root/openuds/server/src/uds/web/util/services.py", line 431, in enable_service
info = UserServiceManager.manager().get_user_service_info(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/openuds/server/src/uds/core/managers/userservice.py", line 943, in get_user_service_info
raise InvalidServiceException(
The text was updated successfully, but these errors were encountered: