Skip to content

Commit

Permalink
disk: do not get nodeID on provisioner
Browse files Browse the repository at this point in the history
Fixes: 329c8c4
  • Loading branch information
huww98 committed Feb 20, 2024
1 parent 46ff659 commit e777adf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/disk/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,17 @@ func GlobalConfigSet(m metadata.MetadataProvider) *restclient.Config {
clustID := os.Getenv("CLUSTER_ID")

controllerServerType := false
nodeID := ""
if os.Getenv(utils.ServiceType) == utils.ProvisionerService {
controllerServerType = true
} else {
nodeID = metadata.MustGet(m, metadata.InstanceID)
}

// Global Config Set
GlobalConfigVar = GlobalConfig{
Region: metadata.MustGet(m, metadata.RegionID),
NodeID: metadata.MustGet(m, metadata.InstanceID),
NodeID: nodeID,
ADControllerEnable: csiCfg.GetBool("disk-adcontroller-enable", "DISK_AD_CONTROLLER", false),
DiskTagEnable: csiCfg.GetBool("disk-tag-by-plugin", "DISK_TAGED_BY_PLUGIN", false),
DiskBdfEnable: csiCfg.GetBool("disk-bdf-enable", "DISK_BDF_ENABLE", false),
Expand Down

0 comments on commit e777adf

Please sign in to comment.