Bug 1332663

Summary: Director install guide should list steps to re-sync sqlite database after deletion
Product: Red Hat OpenStack Reporter: Jeremy <jmelvin>
Component: documentationAssignee: Dan Macpherson <dmacpher>
Status: CLOSED CURRENTRELEASE QA Contact: RHOS Documentation Team <rhos-docs>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0 (Liberty)CC: dmacpher, jmelvin, lbopf, srevivo
Target Milestone: ---Keywords: Documentation, ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-16 04:46:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jeremy 2016-05-03 17:05:17 UTC
Description of problem: In the guide : https://access.redhat.com/documentation/en/red-hat-openstack-platform/version-8/director-installation-and-usage/#sect-Troubleshooting_Hardware_Introspection

The precedure is : Procedure 11.3. Stopping the Discovery Process

Change the power state of each node to off:
$ ironic node-set-power-state [NODE UUID] off
Remove ironic-inspector cache and restart it:
$ rm /var/lib/ironic-inspector/inspector.sqlite
$ sudo systemctl restart openstack-ironic-inspector

It should be : 

Procedure 11.3. Stopping the Discovery Process

Change the power state of each node to off:
$ ironic node-set-power-state [NODE UUID] off
Remove ironic-inspector cache and restart it:
$ rm /var/lib/ironic-inspector/inspector.sqlite
$ sudo systemctl restart openstack-ironic-inspector
$[root@tst-omuc-01 ~]# ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade




Actual results:
fails to start

Expected results:
need to add step to resync the db using :
 [root@tst- ~]# ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade


Additional info:
Failure to re-sync the db will cause:

[root@tst-omuc-01 ~]# openstack baremetal introspection start f196c053-2c16-454e-91ca-dee0188efcbf
Internal server error (OperationalError): (sqlite3.OperationalError) no such table: attributes [SQL: u'DELETE FROM attributes WHERE attributes.uuid = ?'] [parameters: (u'f196c053-2c16-454e-91ca-dee0188efcbf',)]

Comment 2 Dan Macpherson 2016-05-13 03:14:51 UTC
This change is now live on the portal:

https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/director-installation-and-usage/112-troubleshooting-hardware-introspection

Jeremy, were there any further changes required for this item?

Comment 3 Dan Macpherson 2016-06-16 04:46:48 UTC
No response in over a month. Closing this BZ as the changes are live on the portal. Feel free to reopen if further changes are required.