Created attachment 1190138 [details] Hot fix for tagging storages that are not attached to a host The root cause of this issue is that there are storage instances in the DB (provided by the customer and used to recreate) that are not attached to any hosts. Attempting to tag one of these storages will result in the reported error. The attached hot fix handles that situation and allows the tag operation to complete successfully. Follow these steps to apply the fix - 1. Copy the tar file bz-1365688-storage-tenant-identity.tar to the /var/www/miq/vmdb directory on the appliance. 2. Make a backup copy of /var/www/miq/vmdb/app/models/storage.rb 3. cd to /var/www/miq/vmdb on the appliance an unpack the tar file tar -xvf bz-1365688-storage-tenant-identity.tar 4. Restart EVM
https://github.com/ManageIQ/manageiq/pull/10419
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/3ce925b216c13aecde33359a1887e6850d278cbb commit 3ce925b216c13aecde33359a1887e6850d278cbb Author: Gregg Tanzillo <gtanzill> AuthorDate: Thu Aug 11 16:27:09 2016 -0400 Commit: Gregg Tanzillo <gtanzill> CommitDate: Thu Aug 11 16:27:09 2016 -0400 Fixed tenant_identity to handle storage that does not belong to an EMS - Removed #tenant_identity method in place of mixing version that already handles nil EMS - Storages belong to an EMS indirectly through the hosts to which it is attached. If a storage is not attached to any hosts the EMS will be nil. In that case the root tenant will be used for the tenant_identity. https://bugzilla.redhat.com/show_bug.cgi?id=1365688 app/models/storage.rb | 5 +---- spec/models/storage_spec.rb | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-)
New commit detected on ManageIQ/manageiq/darga: https://github.com/ManageIQ/manageiq/commit/c25e4078d934c6aeccebfd51b2e4a8d6f2d047e9 commit c25e4078d934c6aeccebfd51b2e4a8d6f2d047e9 Author: Gregg Tanzillo <gtanzill> AuthorDate: Tue Aug 23 18:07:53 2016 -0400 Commit: Gregg Tanzillo <gtanzill> CommitDate: Tue Aug 23 18:07:53 2016 -0400 Fixed tenant_identity to handle storage that does not belong to an EMS Storages belong to an EMS indirectly through the hosts to which it is attached. If a storage is not attached to any hosts the EMS will be nil. In that case the root tenant will be used for the tenant_identity. Backported from https://github.com/ManageIQ/manageiq/pull/10419. Was done manually because the change upstream was different for the draga branch. https://bugzilla.redhat.com/show_bug.cgi?id=1365688 app/models/storage.rb | 6 +++++- spec/models/storage_spec.rb | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-)