You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use force=True for os-brick disconnect during delete
The 'force' parameter of os-brick's disconnect_volume() method allows
callers to ignore flushing errors and ensure that devices are being
removed from the host.
We should use force=True when we are going to delete an instance to
avoid leaving leftover devices connected to the compute host which
could then potentially be reused to map to volumes to an instance that
should not have access to those volumes.
We can use force=True even when disconnecting a volume that will not be
deleted on termination because os-brick will always attempt to flush
and disconnect gracefully before forcefully removing devices.
Conflicts:
nova/tests/unit/virt/libvirt/volume/test_lightos.py
nova/virt/libvirt/volume/lightos.py
NOTE(melwitt): The conflicts are because change
Ic314b26695d9681d31a18adcec0794c2ff41fe71 (Lightbits LightOS driver) is
not in Xena.
NOTE(melwitt): The difference from the cherry picked change is because
of the following additional affected volume driver in Wallaby:
* nova/virt/libvirt/volume/net.py
Closes-Bug: #2004555
Change-Id: I3629b84d3255a8fe9d8a7cea8c6131d7c40899e8
(cherry picked from commit db45554)
(cherry picked from commit efb0198)
(cherry picked from commit 8b4b991)
(cherry picked from commit 4d8efa2)
(cherry picked from commit b574901)
2018-12-17 13:47:30.685 16987 INFO nova.compute.manager [req-7bc758de-b2e4-461b-a971-f79be6cd4703 313d1247d7b845da9c731eec53e50a26 2f693c782fa748c2baece8db95b4ba5b - default default] [instance: ead8ecc3-f473-4672-a67b-c44534c6042d] Swapping old allocation on 3e32d595-bd1f-4136-a7f4-c6703d2fbe18 held by migration 17bec61d-544d-47e0-a1c1-37f9d7385286 for instance
505
-
2018-12-17 13:47:32.450 16987 ERROR nova.volume.cinder [req-7bc758de-b2e4-461b-a971-f79be6cd4703 313d1247d7b845da9c731eec53e50a26 2f693c782fa748c2baece8db95b4ba5b - default default] Delete attachment failed for attachment 58997d5b-24f0-4073-819e-97916fb1ee19. Error: The request you have made requires authentication. (HTTP 401) Code: 401: Unauthorized: The request you have made requires authentication. (HTTP 401)
506
-
507
-
Solution
508
-
~~~~~~~~
509
-
510
-
Configure nova to use service user tokens to supplement the regular user token
511
-
used to initiate the operation. The identity service (keystone) will then
512
-
authenticate a request using the service user token if the user token has
513
-
already expired.
514
-
515
-
To use, create a service user in the identity service similar as you would when
516
-
creating the ``nova`` service user.
517
-
518
-
Then configure the :oslo.config:group:`service_user` section of the nova
519
-
configuration file, for example:
520
-
521
-
.. code-block:: ini
522
-
523
-
[service_user]
524
-
send_service_user_token = True
525
-
auth_type = password
526
-
project_domain_name = Default
527
-
project_name = service
528
-
user_domain_name = Default
529
-
password = secretservice
530
-
username = nova
531
-
auth_url = https://104.130.216.102/identity
532
-
...
533
-
534
-
And configure the other identity options as necessary for the service user,
535
-
much like you would configure nova to work with the image service (glance)
536
-
or networking service.
537
-
538
-
.. note::
539
-
540
-
Please note that the role of the :oslo.config:group:`service_user` you
541
-
configure needs to be a superset of
542
-
:oslo.config:option:`keystone_authtoken.service_token_roles` (The option
543
-
:oslo.config:option:`keystone_authtoken.service_token_roles` is configured
0 commit comments