Restore iSCSI configuration for Cinder / Nova
In few cases (i.e. cinder-volume crash), some cinder volumes cannot be accessed by a VM (I/O errors), but are still displayed as associated when using cinder or nova CLI. Looking at the hypervisor’s log, you may see:
May 11 13:26:45 cloudhyp1 iscsid: conn 0 login rejected: target error (03/01)
May 11 13:26:45 cloudhyp1 iscsid: conn 0 login rejected: initiator failed authorization with target
May 11 13:26:45 cloudhyp1 iscsid: conn 0 login rejected: initiator failed authorization with target
On the cinder-volume host, check the configuration of iSCSI target:
1 | \[root@controller?~\]\# targetcli ls |
In that case, the cloudhyp1 cannot connect to the target because no ACL are defined ([ACLs: 0])
?You have to setup the ACL manually:
1 | [root@controller?~]# mysql -u cinder -p -e "select provider_auth from volumes where id='6e95e5b6-83e1-4958-a5e1-ba5afc94559e'" cinder |
You have to replace?chap_userid_,?_chap_password?and?_node_wwn_?by values obtained in steps?1,?2and?3?respectively.
Then check and load the configuration:
1 | [root@controller ~]# cat /etc/target/saveconfig.json | json_verify |