chrxmvtik opened a new issue, #10043:
URL: https://github.com/apache/cloudstack/issues/10043
<!--
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
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
API
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
4.19.1.3, 4.20.0.0
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network,
advanced networking, etc. N/A otherwise
-->
Basic
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
Cloudstack Simulator
##### SUMMARY
<!-- Explain the problem/feature briefly -->
##### 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.
-->
<!-- Paste example playbooks or commands between quotes below -->
Using CMK for API
~~~
listCounters result:
[{
"id": "1a57158d-acce-11ef-ae80-0242ac110002",
"name": "Linux System CPU - percentage",
"provider": "Netscaler",
"source": "SNMP",
"value": "1.3.6.1.4.1.2021.11.10.0"
}]
~~~
Delete counter:
~~~
deleteCounter id=1a57158d-acce-11ef-ae80-0242ac110002
result:
{
"success": true
}
~~~
Create a counter with the same configuration:
~~~
createCounter name="Linux System CPU - percentage" provider="Netscaler"
source="SNMP" value="1.3.6.1.4.1.2021.11.10.0"
🙈 Error: (HTTP 530, error code 9999) Entity already exists
~~~
Create a counter using different value:
~~~
createCounter name="Linux System CPU - percentage" provider="Netscaler"
source="SNMP" value="1.3.6.1.4.1.2021.11.12.0"
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 1 [running]:
github.com/apache/cloudstack-cloudmonkey/cmd.pollAsyncJob(0x140013a6780,
{0x1400001c270, 0x24})
/Users/rohit/lab/apache/cloudstack-cloudmonkey/cmd/network.go:171 +0x500
github.com/apache/cloudstack-cloudmonkey/cmd.NewAPIRequest(0x140013a6780,
{0x14000fc77f0, 0xd}, {0x140013c0210, 0x4, 0x0?}, 0x1)
/Users/rohit/lab/apache/cloudstack-cloudmonkey/cmd/network.go:272
+0x1100
github.com/apache/cloudstack-cloudmonkey/cmd.init.0.func1(0x140013a6780)
/Users/rohit/lab/apache/cloudstack-cloudmonkey/cmd/api.go:80 +0x488
github.com/apache/cloudstack-cloudmonkey/cli.ExecCmd({0x140013c0200?, 0x5,
0x8})
/Users/rohit/lab/apache/cloudstack-cloudmonkey/cli/exec.go:67 +0x238
github.com/apache/cloudstack-cloudmonkey/cli.ExecLine({0x14001802e80, 0x76})
/Users/rohit/lab/apache/cloudstack-cloudmonkey/cli/exec.go:51 +0x1ec
github.com/apache/cloudstack-cloudmonkey/cli.ExecPrompt()
/Users/rohit/lab/apache/cloudstack-cloudmonkey/cli/prompt.go:84 +0x260
main.main()
/Users/rohit/lab/apache/cloudstack-cloudmonkey/cmk.go:101 +0x6a4
~~~
createCounter function causes this error, however in v4.20.0.0 it creates a
counter even tho it errored, however in v4.19.1.3 it doesn't create a counter.
<!-- You can also paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
createCounter function works properly
deleteCounter function removes counter and allow us to create a counter with
the same value
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
Function causes an error, unable to create/delete a counter properly.
~~~
--
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]