Skip to content

NPE if global setting "implicit.host.tags" is set to null #8056

@weizhouapache

Description

@weizhouapache

steps to reproduce the issue

  • add xen hosts with GPU, this can be simularted by database change
insert into host_gpu_groups select 1,'GPU',id from host where type='Routing' and removed is null limit 1;
  • change global setting "implicit.host.tags" to null
  • deploy a new vm

Got an exception:

2023-10-09 10:11:22,381 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-8:ctx-5c18d0af job-1130) (logid:815ab064) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vm.DeployVMCmdByAdmin
java.lang.NullPointerException
        at com.cloud.deploy.FirstFitPlanner.reorderClustersBasedOnImplicitTags(FirstFitPlanner.java:218)
        at com.cloud.deploy.FirstFitPlanner.orderClusters(FirstFitPlanner.java:206)
        at com.cloud.deploy.DeploymentPlanningManagerImpl.planDeployment(DeploymentPlanningManagerImpl.java:568)
ISSUE TYPE
  • Bug Report
COMPONENT NAME

CLOUDSTACK VERSION

CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions