Giter VIP home page Giter VIP logo

Comments (5)

onenhansen avatar onenhansen commented on August 23, 2024 1

🤦 Yep, you are right. I missed where it was generating the timestamp for the key. Gotta love problems from code written 2 years ago. I'm unsure why we haven't encountered this issue before now though.

We will change this code to generate a proper key going forward.

Thank you for your assistance @agrare , I'll close this issue since it doesn't exist in the rbvmomi2 repo.

from rbvmomi2.

agrare avatar agrare commented on August 23, 2024

Thanks @onenhansen I'll try to reproduce this on my side. Could you re-run your reproducer but with SOAP debug enabled? You can either run with the RBVMOMI_DEBUG=1 environment variable or pass the debug: true option to RbVmomi::VIM.connect(). This will print the raw XML to stderr.

from rbvmomi2.

onenhansen avatar onenhansen commented on August 23, 2024

Hi @agrare thanks for looking into this.

I've rerun this with the debug enabled in the connect method. All of the previous requests go through properly, it gets the VM information right before this and appears to look good. It definitely looks like it's related to the key value being interpreted as a string. Perhaps it is only a 32-bit integer and this is too large for it.

Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: Request:
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: 
<env:Envelope
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<env:Body>
		<ReconfigVM_Task
			xmlns="urn:vim25">
			<_this type="VirtualMachine">vm-109</_this>
			<spec xsi:type="VirtualMachineConfigSpec">
				<deviceChange xsi:type="VirtualDeviceConfigSpec">
					<operation>add</operation>
					<device xsi:type="VirtualVmxnet3">
						<key>11093059964</key>
						<deviceInfo xsi:type="Description">
							<label>net2</label>
							<summary>VM Network</summary>
						</deviceInfo>
						<backing xsi:type="VirtualEthernetCardNetworkBackingInfo">
							<deviceName>VM Network</deviceName>
							<network type="Network">network-16</network>
						</backing>
						<unitNumber>8</unitNumber>
						<addressType>manual</addressType>
						<macAddress>02:00:29:9e:bb:fa</macAddress>
					</device>
				</deviceChange>
			</spec>
		</ReconfigVM_Task>
	</env:Body>
</env:Envelope>
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: 
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: Response (in 0.003 s)
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: <?xml version="1.0" encoding="UTF-8"?>
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: <soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: <soapenv:Body>
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: <soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: Cannot parse "11093059964" as an int value
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: 
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: while parsing serialized value of type int
Thu Nov  9 17:31:00 2023 [Z0][VMM][I]: at line 1, column 406
...
same as above past here

Since I wasn't involved in writing this driver I've been reading through our code to see if the key is being generated as a number higher than a 32-bit integer.

Let me know about any further information, I'll try to trace this a bit better in the next couple days.

from rbvmomi2.

agrare avatar agrare commented on August 23, 2024

Interesting so I see you're using a timestamp for the temp key https://github.com/OpenNebula/one/blame/master/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb#L2031

The usual "best practice" from my experience with VM reconfigure is to use e.g. -100 for the first new device, -101 for the second etc...

If you replace that timestamp with -100 does the reconfigure work?

from rbvmomi2.

agrare avatar agrare commented on August 23, 2024

Awesome! Glad you were able to get it working

from rbvmomi2.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.