You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "shwstppr (via GitHub)" <gi...@apache.org> on 2026/06/10 04:54:04 UTC
[I] Error during resetPasswordForVirtualMachine [cloudstack]
shwstppr opened a new issue, #13387:
URL: https://github.com/apache/cloudstack/issues/13387
### problem
Execution of resetPasswordForVirtualMachine fails when no password is provided explicitly.
An error is seen in the API/UI,
<img width="1156" height="506" alt="Image" src="https://github.com/user-attachments/assets/a9ce097a-92b6-47a1-87c5-fcbc36ce7a68" />
While debugging I could obfuscatePassword method is causing the failure https://github.com/apache/cloudstack/blob/main/framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java#L340
It wrongly trims the UserVMResponse string resulting in truncated string like,
<img width="1329" height="1258" alt="Image" src="https://github.com/user-attachments/assets/8fb58b54-6d79-4bbe-a4b6-3c73eca38edd" />
This causes failure while creating JSON object.
```
2026-06-10 04:41:39,009 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-5:[ctx-1f56cfeb, job-524]) (logid:4137017f) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vm.ResetVMPasswordCmdByAdmin com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at line 1 column 1390 path $.details.
at com.google.gson.internal.Streams.parse(Streams.java:59)
at com.google.gson.JsonParser.parseReader(JsonParser.java:102)
at com.google.gson.JsonParser.parseReader(JsonParser.java:70)
at com.google.gson.JsonParser.parseString(JsonParser.java:51)
at com.google.gson.JsonParser.parse(JsonParser.java:115)
at com.cloud.utils.HumanReadableJson.addElement(HumanReadableJson.java:60)
at com.cloud.utils.HumanReadableJson.getHumanReadableBytesJson(HumanReadableJson.java:54)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl.convertHumanReadableJson(AsyncJobManagerImpl.java:430)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl.completeAsyncJob(AsyncJobManagerImpl.java:340)
at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:113)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:698)
at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:646)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.EOFException: End of input at line 1 column 1390 path $.details.
at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1457)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:503)
at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:422)
at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:779)
at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725)
at com.google.gson.internal.Streams.parse(Streams.java:49)
... 21 more
```
### versions
4.22.1, KVM Advanced zone but the issue could be preset for other configs as well
### The steps to reproduce the bug
1. Deploy a VM with a password enabled template
2. Stop it
3. Reset VM password without providing a password
### What to do about it?
Fix the isssue
--
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: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Error during resetPasswordForVirtualMachine [cloudstack]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13387:
URL: https://github.com/apache/cloudstack/issues/13387#issuecomment-4710104824
### 🏷️ Issue Triaged
Hi `@shwstppr`! I've categorized this issue as **bug** based on the following analysis:
**Reasoning**: The issue describes a reproducible failure in `resetPasswordForVirtualMachine` where a `JsonSyntaxException` / `EOFException` is thrown due to the `obfuscatePassword` method incorrectly trimming the `UserVMResponse` string, causing JSON parsing errors.
<details>
<summary>View Triage Details</summary>
#### Analysis
- **Keywords detected**: `error`, `fails`, `exception`, `JsonSyntaxException`, `EOFException`, `truncated`, `failure`
- **Issue type indicators**: Includes a full stack trace, reproducible steps, root cause analysis pointing to a specific code path (`AsyncJobManagerImpl.java:340`), and an observed runtime exception
- **Confidence**: High
#### Recommended Next Steps
- Fix the `obfuscatePassword` method to handle JSON strings that contain the password field more than once
- Consider marking the password detail with `display=false` so it doesn't appear in `UserVmResponse` as suggested in the issue
</details>
**References**: [Triage run §27560784794](https://github.com/apache/cloudstack/actions/runs/27560784794)
> Generated by [🔧 Issue Triage Agent](https://github.com/apache/cloudstack/actions/runs/27560784794) · sonnet46 846.8K · [◷](https://github.com/search?q=repo%3Aapache%2Fcloudstack+%22gh-aw-workflow-call-id%3A+apache%2Fcloudstack%2Fissue-triage-agent%22&type=issues)
>
<details>
<summary>Add this agentic workflows to your repo</summary>
To install this agentic workflow, run
```
gh aw add github/gh-aw/.github/workflows/issue-triage-agent.md@359795d49ada21681ab616bd4cbcb144a7387115
```
</details>
<!-- gh-aw-agentic-workflow: Issue Triage Agent, engine: copilot, version: 1.0.52, model: claude-sonnet-4.6, id: 27560784794, workflow_id: issue-triage-agent, run: https://github.com/apache/cloudstack/actions/runs/27560784794 -->
<!-- gh-aw-workflow-call-id: apache/cloudstack/issue-triage-agent -->
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Error during resetPasswordForVirtualMachine [cloudstack]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13387:
URL: https://github.com/apache/cloudstack/issues/13387#issuecomment-4682679117
### 🏷️ Issue Triaged
Hi @shwstppr! I've categorized this issue as **bug** based on the following analysis:
**Reasoning**: The issue reports an unexpected API/UI error when calling `resetPasswordForVirtualMachine`, traced to a defect in the `obfuscatePassword` method within `AsyncJobManagerImpl`. This is a reproducible failure in existing functionality.
<details>
<summary>View Triage Details</summary>
#### Analysis
- **Keywords detected**: `error`, `fails`, `failure`, `exception`, `obfuscatePassword`, `wrong`
- **Issue type indicators**: API call returns an error; stack trace points to a specific method; existing functionality broken
- **Confidence**: High
#### Recommended Next Steps
- Review `obfuscatePassword` in `AsyncJobManagerImpl.java` around line 340 for the root cause
- Add a regression test covering `resetPasswordForVirtualMachine` without an explicit password parameter
- Consider checking if other job parameters using `obfuscatePassword` are similarly affected
</details>
**References**: [Triage run §27360995103](https://github.com/apache/cloudstack/actions/runs/27360995103)
> Generated by [🔧 Issue Triage Agent](https://github.com/apache/cloudstack/actions/runs/27360995103) · sonnet46 1M · [◷](https://github.com/search?q=repo%3Aapache%2Fcloudstack+%22gh-aw-workflow-call-id%3A+apache%2Fcloudstack%2Fissue-triage-agent%22&type=issues)
>
<details>
<summary>Add this agentic workflows to your repo</summary>
To install this agentic workflow, run
```
gh aw add github/gh-aw/.github/workflows/issue-triage-agent.md@359795d49ada21681ab616bd4cbcb144a7387115
```
</details>
<!-- gh-aw-agentic-workflow: Issue Triage Agent, engine: copilot, version: 1.0.52, model: claude-sonnet-4.6, id: 27360995103, workflow_id: issue-triage-agent, run: https://github.com/apache/cloudstack/actions/runs/27360995103 -->
<!-- gh-aw-workflow-call-id: apache/cloudstack/issue-triage-agent -->
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Error during resetPasswordForVirtualMachine [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on issue #13387:
URL: https://github.com/apache/cloudstack/issues/13387#issuecomment-4667843671
Probably password details should be added as display=false
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Error during resetPasswordForVirtualMachine [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on issue #13387:
URL: https://github.com/apache/cloudstack/issues/13387#issuecomment-4667563527
@weizhouapache based on m debugging issue occurs when UserVmResponse for the AsyncJob has password field twice, one in root object and once in details. Based on the code I guess it happens when VR is not running. And once the details is added by password reset code, it remains there even after VR is started and subsequent password reset calls are done.
<img width="1156" height="506" alt="Image" src="https://github.com/user-attachments/assets/1d3c7544-1776-4384-8057-5ea4a63daf81" />
I guess workaround is to remove that password detail for the VM.
To reproduce, maybe you can destroy the VR or add a password detail for the VM
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Error during resetPasswordForVirtualMachine [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #13387:
URL: https://github.com/apache/cloudstack/issues/13387#issuecomment-4667614865
@shwstppr
thanks for the info.
I have reproduced the issue when the VR is stopped.
it also happened when reset vm password with providing the new password
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Error during resetPasswordForVirtualMachine [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed issue #13387: Error during resetPasswordForVirtualMachine
URL: https://github.com/apache/cloudstack/issues/13387
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Error during resetPasswordForVirtualMachine [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #13387:
URL: https://github.com/apache/cloudstack/issues/13387#issuecomment-4667309732
@shwstppr
I tried the steps multiple times, all good. strange
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org