rundeck-plugins / rundeck-azure-plugin

8 stars 16 forks source link

Cannot start VM creation task when choosing custom Image URIs #20

Open noxx5489 opened 3 years ago

noxx5489 commented 3 years ago

Hi,

It is impossible to use a custom Image URL if I leave the "Known Image" field blank and the OS Type set to something. In fact leaving the OS Type blank would not let me save the task. If I choose an image from the "Known Image" dropdown and use an Imag URL, the job fails.

Please advise

########################################################## [workflow] Begin step: 1,azure-vm-create-step 1: Workflow step executing: StepExecutionItem{type='azure-vm-create-step', keepgoingOnSuccess=false, hasFailureHandler=false} Failed executing step plugin [azure-vm-create-step]: java.lang.IllegalArgumentException: No enum constant com.rundeck.plugins.azure.azure.AzureVmImageType.LinuxType. at java.lang.Enum.valueOf(Enum.java:238) at sun.reflect.GeneratedMethodAccessor1616.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1491) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:62) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:216) at com.rundeck.plugins.azure.azure.AzureVmImageType$LinuxType.valueOf(AzureVmImageType.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1470) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:985) at org.codehaus.groovy.runtime.StringGroovyMethods.asType(StringGroovyMethods.java:196) at org.codehaus.groovy.runtime.dgm$1102.doMethodInvoke(Unknown Source) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1217) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041) at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:999) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:990) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:180) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.asType(ScriptBytecodeAdapter.java:603) at com.rundeck.plugins.azure.azure.AzureManager.createVirtualMachine(AzureManager.groovy:175) at com.rundeck.plugins.azure.azure.AzureManager$createVirtualMachine$11.call(Unknown Source) at com.rundeck.plugins.azure.plugin.AzureVMCreatePlugin.executeStep(AzureVMCreatePlugin.groovy:210) at com.dtolabs.rundeck.core.execution.workflow.steps.StepPluginAdapter.executeWorkflowStep(StepPluginAdapter.java:125) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:111) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowExecutor.executeWFItem(BaseWorkflowExecutor.java:285) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowExecutor.executeWorkflowStep(BaseWorkflowExecutor.java:681) at com.dtolabs.rundeck.core.execution.workflow.engine.StepCallable.apply(StepCallable.java:71) at com.dtolabs.rundeck.core.execution.workflow.engine.StepOperation.apply(StepOperation.java:76) at com.dtolabs.rundeck.core.execution.workflow.engine.StepOperation.apply(StepOperation.java:32) at com.dtolabs.rundeck.core.rules.WorkflowEngineOperationsProcessor.lambda$beginOperation$2(WorkflowEngineOperationsProcessor.java:330) at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57) at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 1: Workflow step finished, result: PluginFailed: No enum constant com.rundeck.plugins.azure.azure.AzureVmImageType.LinuxType. [workflow] Finish step: 1,azure-vm-create-step

######################################################