Skip to content

Commit

Permalink
DE2222 and IQN update. (#205)
Browse files Browse the repository at this point in the history
* DE22222: iSCSI volumes are failing to attach to host
* bump the version to be consistent to with the release tag (to be bumped)
* update IQN fix
  • Loading branch information
ron-saito authored Jun 14, 2024
1 parent 5e1a028 commit 0bd2325
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions internal/resources/resource_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ func resourceMetalHostCreate(d *schema.ResourceData, meta interface{}) (err erro
Pending: []string{
string(rest.HOSTSTATE_NEW),
string(rest.HOSTSTATE_IMAGING_PREP),
string(rest.HOSTSTATE_ISCSI_ATTACHING),
string(rest.HOSTSTATE_IMAGING),
string(rest.HOSTSTATE_CONNECTING),
string(rest.HOSTSTATE_ATTACHING),
Expand Down Expand Up @@ -761,8 +762,10 @@ func resourceMetalHostUpdate(d *schema.ResourceData, meta interface{}) (err erro

// initiator name
updInitiatorName, ok := d.Get(hInitiatorName).(string)
if ok && updInitiatorName != "" && updInitiatorName != host.ISCSIConfig.InitiatorName {
updateHost.ISCSIConfig.InitiatorName = updInitiatorName
if (ok && updInitiatorName != "") && (updInitiatorName != host.ISCSIConfig.InitiatorName) {
updateHost.ISCSIConfig = &rest.UpdateHostIscsiConfig{
InitiatorName: updInitiatorName,
}
}

// set the network ids
Expand Down Expand Up @@ -887,6 +890,7 @@ func resourceMetalHostDelete(d *schema.ResourceData, meta interface{}) (err erro
deleteStateConf := &retry.StateChangeConf{
Pending: []string{
string(rest.HOSTSTATE_DETACHING),
string(rest.HOSTSTATE_ALL_DETACHING),
string(rest.HOSTSTATE_DELETING),
},
Target: []string{
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.54
1.3.56

0 comments on commit 0bd2325

Please sign in to comment.