andrijapanicsb opened a new issue, #7285:
URL: https://github.com/apache/cloudstack/issues/7285
<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete
the comments.
-->
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
* Improvement Request
* Enhancement Request
* Feature Idea
* Documentation Report
* Other
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
4.17.1.0
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network,
advanced networking, etc. N/A otherwise
-->
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
VMware 6.7
##### SUMMARY
<!-- Explain the problem/feature briefly -->
While ESXi host is being put into maintenance mode in ACS - if the VM is
being migrated while its VR is also in the Migrating state - the UserData can’t
be updated after the user VM migration is done (because VR is in “Migrating”
state) - thus ACS cancels the user VM migration job (even though the VM was
already moved to a new host) and issues Stop command, causing VM to stop.
##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal
test-case. Use Screenshots if accurate.
For new features, show how the feature would be used.
-->
Put host into maintenance mode - optionally, since this could be hard to
reproduce in the non-busy/test env, consider manually updating the VR state to
"Migrating" in databases (not reproduced at the moment of creating this issues)
<!-- Paste example playbooks or commands between quotes below -->
~~~
~~~
<!-- You can also paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
Migration completes.
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
Migation "physically" finishes (user VM moved to another host), migration
job cancelled, and VM stopped as a result of failed migration job.
~~~
Log excerpt:
`2023-02-07 15:39:59,157 DEBUG [c.c.a.m.ClusteredAgentAttache]
(Work-Job-Executor-100:ctx-117cc6cd job-2450367/job-2455893 ctx-69f4e98e)
(logid:106487b6) Seq 39519-3613294276034694276: Forwarding Seq
39519-3613294276034694276: { Cmd , MgmtId: 345049516315, via:
39519(b-esx-inter-003.mgmt.c.domain.local), Ver: v1, Flags: 100011,
[{"com.cloud.agent.api.CheckVirtualMachineCommand":{"vmName":"i-390-172822-VM","wait":"20","bypassHostMaintenance":"false"}}]
} to 345049484389
2023-02-07 15:39:59,198 DEBUG [c.c.a.t.Request]
(AgentManager-Handler-3:null) (logid:) Seq 39519-3613294276034694276:
Processing: { Ans: , MgmtId: 345049516315, via: 39519, Ver: v1, Flags: 10,
[{"com.cloud.agent.api.CheckVirtualMachineAnswer":{"state":"PowerOn","result":"true","wait":"0","bypassHostMaintenance":"false"}}]
}
2023-02-07 15:39:59,198 DEBUG [c.c.a.t.Request]
(Work-Job-Executor-100:ctx-117cc6cd job-2450367/job-2455893 ctx-69f4e98e)
(logid:106487b6) Seq 39519-3613294276034694276: Received: { Ans: , MgmtId:
345049516315, via: 39519(b-esx-inter-003.mgmt.c.domain.local), Ver: v1, Flags:
10, { CheckVirtualMachineAnswer } }
2023-02-07 15:39:59,227 DEBUG [o.a.c.e.o.VolumeOrchestrator]
(Work-Job-Executor-100:ctx-117cc6cd job-2450367/job-2455893 ctx-69f4e98e)
(logid:106487b6) Releasing 2 volumes for VM: 172822 from host: 39516
2023-02-07 15:39:59,268 DEBUG [c.c.n.NetworkModelImpl]
(Work-Job-Executor-100:ctx-117cc6cd job-2450367/job-2455893 ctx-69f4e98e)
(logid:106487b6) Service SecurityGroup is not supported in the network id=24593
2023-02-07 15:39:59,304 WARN [c.c.n.e.VirtualRouterElement]
(Work-Job-Executor-100:ctx-117cc6cd job-2450367/job-2455893 ctx-69f4e98e)
(logid:106487b6) Failed to update userdata for vm VM instance {id: "172822",
name: "i-390-172822-VM", uuid: "cc2b97f6-b3be-4f0b-857f-2b9fb22b846b",
type="User"} and nic NicProfile
{"broadcastUri":"vlan:\/\/1206","iPv4Address":"172.26.0.8","id":407159,"reservationId":"bb8d02b1-cd90-4367-b099-2ce888c31308","vmId":172822}
2023-02-07 15:39:59,354 DEBUG [o.a.c.n.t.BasicNetworkTopology]
(Work-Job-Executor-100:ctx-117cc6cd job-2450367/job-2455893 ctx-69f4e98e)
(logid:106487b6) SAVE USERDATA TO ROUTE RULES
2023-02-07 15:39:59,355 WARN [o.a.c.n.t.BasicNetworkTopology]
(Work-Job-Executor-100:ctx-117cc6cd job-2450367/job-2455893 ctx-69f4e98e)
(logid:106487b6) Unable to apply save userdata entry, virtual router is not in
the right state Migrating
2023-02-07 15:39:59,355 WARN [c.c.v.VirtualMachineManagerImpl]
(Work-Job-Executor-100:ctx-117cc6cd job-2450367/job-2455893 ctx-69f4e98e)
(logid:106487b6) Unable to migrate VM instance {id: "172822", name:
"i-390-172822-VM", uuid: "cc2b97f6-b3be-4f0b-857f-2b9fb22b846b", type="User"}
to Host {"id": "39519", "name": "b-esx-inter-003.mgmt.c.domain.local", "uuid":
"5ee7908b-b344-4e83-8034-d4c7a1868339", "type"="Routing"} due to [Resource
[DataCenter:1] is unreachable: Unable to apply save userdata entry, virtual
router is not in the right state]
com.cloud.exception.ResourceUnavailableException: Resource [DataCenter:1] is
unreachable: Unable to apply save userdata entry, virtual router is not in the
right state
at
org.apache.cloudstack.network.topology.BasicNetworkTopology.applyRules(BasicNetworkTopology.java:412)
at
org.apache.cloudstack.network.topology.BasicNetworkTopology.saveUserDataToRouter(BasicNetworkTopology.java:352)
(edited) `
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]