Skip to content

Conversation

@vits-hugs
Copy link

Description

In the method AgentHandler#processRequest(), the timeout exception of database requests are logged with level warning, this PR corrects the log level to error.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Running the project, and then stopping the database service, to trigger the exception shown below:

2025-04-25 16:20:39,356 ERROR [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-1:null) (logid:) Caught: 
com.cloud.utils.exception.CloudRuntimeException: DB Exception on: null
	at com.cloud.utils.db.GenericDaoBase.update(GenericDaoBase.java:864)
	at com.cloud.utils.db.GenericDaoBase.update(GenericDaoBase.java:819)
	at com.cloud.utils.db.GenericDaoBase.update(GenericDaoBase.java:1490)
	at com.cloud.vm.dao.ConsoleProxyDaoImpl.update(ConsoleProxyDaoImpl.java:138)
	at jdk.internal.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy191.update(Unknown Source)
	at com.cloud.consoleproxy.ConsoleProxyManagerImpl.updateConsoleProxyStatus(ConsoleProxyManagerImpl.java:1655)
	at com.cloud.consoleproxy.ConsoleProxyManagerImpl$VmBasedAgentHook.onLoadReport(ConsoleProxyManagerImpl.java:282)
	at com.cloud.consoleproxy.ConsoleProxyListener.processControlCommand(ConsoleProxyListener.java:56)

This other exception was triggered during remote debug, setting the _key variable to null on the file utils/src/main/java/com/cloud/utils/nio/Link.java line 316.

2025-04-25 16:39:08,580 ERROR [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-8:null) (logid:) Unable to send response because connection is closed: Seq 2-395:  { Ans: , MgmtId: 51351695036381, via: 2, Ver: v1, Flags: 100010, [{"com.cloud.agent.api.Answer":{"result":"false","details":"DB Exception on: null","wait":"0","bypassHostMaintenance":"false"}}] }
2025-04-25 16:38:47,782 ERROR [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-5:null) (logid:) Caught: 
com.cloud.utils.exception.CloudRuntimeException: DB Exception on: null
	at com.cloud.utils.db.GenericDaoBase.update(GenericDaoBase.java:864)
	at com.cloud.utils.db.GenericDaoBase.update(GenericDaoBase.java:819)
	at com.cloud.utils.db.GenericDaoBase.update(GenericDaoBase.java:1490)
	at com.cloud.vm.dao.ConsoleProxyDaoImpl.update(ConsoleProxyDaoImpl.java:138)
	at jdk.internal.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy191.update(Unknown Source)
	at com.cloud.consoleproxy.ConsoleProxyManagerImpl.updateConsoleProxyStatus(ConsoleProxyManagerImpl.java:1655)

How did you try to break this feature and the system with this change?

weizhouapache and others added 30 commits August 7, 2024 18:40
Tell qemu-img that we don't want to use a write cache (we are a block device)
and also specify that we have zeroed devices in most cases.
* 4.18:
  linstor: Improve copyPhysicalDisk performance (apache#9417)
…tednetwork_delete (apache#9571)

* test: fix component tests test_acl_isolatednetwork and test_acl_isolatednetwork_delete

* Update test/integration/component/test_acl_isolatednetwork.py
* Fix VGPU available devices listing

* Missing space

* Refactor
…ed (apache#9578)

vm

Fixes apache#8645

When a local storage volume is being attached to a stopped VM, volume
migration is only needed when it is not present on the last host as the
current host ID will be null in the database.

Signed-off-by: Abhishek Kumar <[email protected]>
Prior to this PR
```
root@r-663-VM:/var/cache/cloud# gzip -dk vpn_user_list.json.aae73e2c-32ba-44f3-bf47-426933a67bcb.gz
root@r-663-VM:/var/cache/cloud# /opt/cloud/bin/update_config.py vpn_user_list.json.aae73e2c-32ba-44f3-bf47-426933a67bcb
{'id': 'vpnuserlist', 'test': {'add': True, 'password': 'test', 'user': 'test'}}
{'vpn_users': [{'user': 'test', 'password': 'test', 'add': True}], 'type': 'vpnuserlist', 'delete_from_processed_cache': False}
 line = # Secrets for authentication using CHAP

 line = # client	server	secret			IP addresses

 line =

 line =

 line = test * test *
```

with this PR
```
root@r-663-VM:/var/cache/cloud# gzip -dk vpn_user_list.json.aae73e2c-32ba-44f3-bf47-426933a67bcb.gz
root@r-663-VM:/var/cache/cloud# /opt/cloud/bin/update_config.py vpn_user_list.json.aae73e2c-32ba-44f3-bf47-426933a67bcb
root@r-663-VM:/var/cache/cloud#
```
* Add validation for secstorage.allowed.internal.sites

* Address comments

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <[email protected]>

* Address comments

---------

Co-authored-by: Suresh Kumar Anaparti <[email protected]>
…che#9206)

```
2024-06-10T12:24:50,711 INFO  [o.a.c.s.i.TemplateServiceImpl] (qtp776484396-20:[ctx-eb090c22, ctx-5fa5579c]) (logid:7a783000) Template Sync did not find 211-2-d536fb03-5f89-3e77-8dea-323315bcbfab on image store 3, may request download based on available hypervisor types
...
2024-06-10T12:24:51,043 INFO  [o.a.c.s.i.TemplateServiceImpl] (qtp776484396-20:[ctx-eb090c22, ctx-5fa5579c]) (logid:7a783000) Skip sync downloading private template 211-2-d536fb03-5f89-3e77-8dea-323315bcbfab to a new image store

```
* Don't delete the snapshot itself on the primary storage upon any failure

* Change an if condition
0.5.1 had a bug while retrieving the bestErrorMessage
for an apicall answer.
shwstppr and others added 29 commits April 9, 2025 09:33
* UI: Move templates creation date to the Zones tab

* Extend changes to ISOs
…ing static NAT, adding PF and LB rules on VPC public IPs (apache#10568)

* fix inconsistency on public IP limits

* fix log message
* assume SLAAC takes care

* log info

* Update server/src/main/java/com/cloud/network/NetworkServiceImpl.java

---------

Co-authored-by: Wei Zhou <[email protected]>
it does not work with python3
```
2025-04-18T10:43:58.5235913Z 2025-04-18 10:32:20,503 - CRITICAL - EXCEPTION: Failure:: ['Traceback (most recent call last):\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 59, in testPartExecutor\n    yield\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 591, in run\n    self._callTestMethod(testMethod)\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 549, in _callTestMethod\n    method()\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/failure.py", line 35, in runTest\n    raise self.exc_val.with_traceback(self.tb)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/loader.py", line 335, in loadTestsFromName\n    module = self.importer.importFromPath(\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 162, in importFromPath\n    return self.importFromDir(dir_path, fqname)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 198, in importFromDir\n    mod = load_module(part_fqname, fh, filename, desc)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 128, in load_module\n    spec.loader.exec_module(mod)\n', '  File "<frozen importlib._bootstrap_external>", line 883, in exec_module\n', '  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed\n', '  File "/home/runner/work/cloudstack/cloudstack/test/integration/smoke/test_certauthority_root.py", line 27, in <module>\n    from OpenSSL.crypto import FILETYPE_PEM, verify, X509\n', "ImportError: cannot import name 'verify' from 'OpenSSL.crypto' (unknown location)\n"]
```
* Fix unit tests due to change in behavior of restore VM

* update numbering in comments

* revert delete operations

* fix placement of start vm after refactoring
…ot from UI when these are supported for the volume (apache#10265)
@vits-hugs vits-hugs closed this May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.