Re: Failed to execute post certificate renewal command - KVM 4.18.1

2024-03-31 Thread Vivek Kumar
Hello Cristian,

Can you show me the output of the file - /etc/default/libvirtd 


Vivek Kumar
Sr. Manager - Cloud & DevOps
TechOps | Indiqus Technologies

vivek.ku...@indiqus.com <mailto:vivek.ku...@indiqus.com>
www.indiqus.com <https://www.indiqus.com/>




> On 30-Mar-2024, at 11:00 PM, cristian.c@istream.today wrote:
> 
> Hello,
> 
>  Yes, I added with ssh password, and I want to reprovision because the status 
> is unsecure in cloudstack UI.
> 
> Regards,
> Cristian
> 
> -Original Message-
> From: Vivek Kumar  
> Sent: Saturday, March 30, 2024 4:33 PM
> To: CloudStack Users Mailing list 
> Subject: Re: Failed to execute post certificate renewal command - KVM 4.18.1
> 
> Hello Cristian,
> 
> Have you added the hosts in cloudstack, and it’s showing unsecure in hosts 
> section, ? And then you are trying to reprovision the security keys ? Is this 
> the case ? 
> 
> Vivek Kumar
> Sr. Manager - Cloud & DevOps
> TechOps | Indiqus Technologies
> 
> vivek.ku...@indiqus.com <mailto:vivek.ku...@indiqus.com>
>   www.indiqus.com <https://www.indiqus.com/>
> 
> 
> 
> 
>> On 29-Mar-2024, at 9:53 PM, cristian.c@istream.today wrote:
>> 
>> Hello,
>> 
>> 
>> 
>>  Any idea how to get rid of this error? I try to provision security 
>> keys for this kvm host, but I end with this error :
>> 
>> 
>> 
>>  This is a new setup, with 4.18.1.0 on ubuntu 22.04, 1x host for 
>> management and 1x  KVM host.
>> 
>> 
>> 2024-03-29 16:16:19,879 INFO  [kvm.storage.LibvirtStorageAdaptor]
>> (agentRequest-Handler-5:null) (logid:0c5006ba) Asking libvirt to 
>> refresh storage pool 552ecff0-1806-407d-8db6-f1c9da18c971
>> 
>> ^C
>> 
>> root@hv-001:/etc/cloudstack/agent# nano agent.properties
>> 
>> root@hv-001:/etc/cloudstack/agent# systemctl restart cloudstack-agent
>> 
>> root@hv-001:/etc/cloudstack/agent# tail -f 
>> /var/log/cloudstack/agent/agent.log
>> 
>> 2024-03-29 16:17:56,744 INFO  [cloud.agent.Agent] 
>> (Agent-Handler-2:null)
>> (logid:) Process agent startup answer, agent id = 0
>> 
>> 2024-03-29 16:17:56,745 INFO  [cloud.agent.Agent] 
>> (Agent-Handler-2:null)
>> (logid:) Set agent id 0
>> 
>> 2024-03-29 16:17:56,750 INFO  [cloud.agent.Agent] 
>> (Agent-Handler-2:null)
>> (logid:) Startup Response Received: agent id = 0
>> 
>> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
>> (agentRequest-Handler-3:null) (logid:5d6aaa47) Processing agent ready 
>> command, agent id = 1
>> 
>> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
>> (agentRequest-Handler-3:null) (logid:5d6aaa47) Set agent id 1
>> 
>> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
>> (agentRequest-Handler-3:null) (logid:5d6aaa47) Ready command is 
>> processed for agent id = 1
>> 
>> 2024-03-29 16:17:57,085 INFO  [cloud.agent.Agent]
>> (agentRequest-Handler-5:null) (logid:5d6aaa47) Processing agent ready 
>> command, agent id = 1
>> 
>> 2024-03-29 16:17:57,086 INFO  [cloud.agent.Agent]
>> (agentRequest-Handler-5:null) (logid:5d6aaa47) Set agent id 1
>> 
>> 2024-03-29 16:17:57,088 INFO  [cloud.agent.Agent]
>> (agentRequest-Handler-5:null) (logid:5d6aaa47) Processed new 
>> management server list: 51.xxx.xxx.69,10.111.0.1@static
>> 
>> 2024-03-29 16:17:57,088 INFO  [cloud.agent.Agent]
>> (agentRequest-Handler-5:null) (logid:5d6aaa47) Ready command is 
>> processed for agent id = 1
>> 
>> 2024-03-29 16:18:20,157 INFO  [kvm.storage.LibvirtStorageAdaptor]
>> (agentRequest-Handler-2:null) (logid:4be26651) Trying to fetch storage 
>> pool
>> 552ecff0-1806-407d-8db6-f1c9da18c971 from libvirt
>> 
>> 2024-03-29 16:18:20,181 INFO  [kvm.storage.LibvirtStorageAdaptor]
>> (agentRequest-Handler-2:null) (logid:4be26651) Asking libvirt to 
>> refresh storage pool 552ecff0-1806-407d-8db6-f1c9da18c971
>> 
>> 2024-03-29 16:18:43,714 INFO
>> [resource.wrapper.LibvirtPostCertificateRenewalCommandWrapper] 
>> (Certificate Renewal Timer:null) (logid:7f9421ae) Restarting libvirt 
>> after certificate provisioning/renewal
>> 
>> 2024-03-29 16:18:43,729 INFO  [cloud.agent.Agent] 
>> (AgentShutdownThread:null)
>> (logid:) Stopping the agent: Reason = sig.kill
>> 
>> 2024-03-29 16:18:43,730 WARN  [cloud.agent.Agent] (Certificate Renewal
>> Timer:null) (logid:7f9421ae) Failed to execute post certificate 
>> renewal
>> command:
>> 
>> java.lang.IllegalStateException: Shutdown in progress
>> 
>>  

RE: Failed to execute post certificate renewal command - KVM 4.18.1

2024-03-30 Thread cristian.c
Hello,

  Yes, I added with ssh password, and I want to reprovision because the status 
is unsecure in cloudstack UI.

Regards,
Cristian

-Original Message-
From: Vivek Kumar  
Sent: Saturday, March 30, 2024 4:33 PM
To: CloudStack Users Mailing list 
Subject: Re: Failed to execute post certificate renewal command - KVM 4.18.1

Hello Cristian,

Have you added the hosts in cloudstack, and it’s showing unsecure in hosts 
section, ? And then you are trying to reprovision the security keys ? Is this 
the case ? 

Vivek Kumar
Sr. Manager - Cloud & DevOps
TechOps | Indiqus Technologies

vivek.ku...@indiqus.com <mailto:vivek.ku...@indiqus.com>
www.indiqus.com <https://www.indiqus.com/>




> On 29-Mar-2024, at 9:53 PM, cristian.c@istream.today wrote:
> 
> Hello,
> 
> 
> 
>   Any idea how to get rid of this error? I try to provision security 
> keys for this kvm host, but I end with this error :
> 
> 
> 
>   This is a new setup, with 4.18.1.0 on ubuntu 22.04, 1x host for 
> management and 1x  KVM host.
> 
> 
> 2024-03-29 16:16:19,879 INFO  [kvm.storage.LibvirtStorageAdaptor]
> (agentRequest-Handler-5:null) (logid:0c5006ba) Asking libvirt to 
> refresh storage pool 552ecff0-1806-407d-8db6-f1c9da18c971
> 
> ^C
> 
> root@hv-001:/etc/cloudstack/agent# nano agent.properties
> 
> root@hv-001:/etc/cloudstack/agent# systemctl restart cloudstack-agent
> 
> root@hv-001:/etc/cloudstack/agent# tail -f 
> /var/log/cloudstack/agent/agent.log
> 
> 2024-03-29 16:17:56,744 INFO  [cloud.agent.Agent] 
> (Agent-Handler-2:null)
> (logid:) Process agent startup answer, agent id = 0
> 
> 2024-03-29 16:17:56,745 INFO  [cloud.agent.Agent] 
> (Agent-Handler-2:null)
> (logid:) Set agent id 0
> 
> 2024-03-29 16:17:56,750 INFO  [cloud.agent.Agent] 
> (Agent-Handler-2:null)
> (logid:) Startup Response Received: agent id = 0
> 
> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-3:null) (logid:5d6aaa47) Processing agent ready 
> command, agent id = 1
> 
> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-3:null) (logid:5d6aaa47) Set agent id 1
> 
> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-3:null) (logid:5d6aaa47) Ready command is 
> processed for agent id = 1
> 
> 2024-03-29 16:17:57,085 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-5:null) (logid:5d6aaa47) Processing agent ready 
> command, agent id = 1
> 
> 2024-03-29 16:17:57,086 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-5:null) (logid:5d6aaa47) Set agent id 1
> 
> 2024-03-29 16:17:57,088 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-5:null) (logid:5d6aaa47) Processed new 
> management server list: 51.xxx.xxx.69,10.111.0.1@static
> 
> 2024-03-29 16:17:57,088 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-5:null) (logid:5d6aaa47) Ready command is 
> processed for agent id = 1
> 
> 2024-03-29 16:18:20,157 INFO  [kvm.storage.LibvirtStorageAdaptor]
> (agentRequest-Handler-2:null) (logid:4be26651) Trying to fetch storage 
> pool
> 552ecff0-1806-407d-8db6-f1c9da18c971 from libvirt
> 
> 2024-03-29 16:18:20,181 INFO  [kvm.storage.LibvirtStorageAdaptor]
> (agentRequest-Handler-2:null) (logid:4be26651) Asking libvirt to 
> refresh storage pool 552ecff0-1806-407d-8db6-f1c9da18c971
> 
> 2024-03-29 16:18:43,714 INFO
> [resource.wrapper.LibvirtPostCertificateRenewalCommandWrapper] 
> (Certificate Renewal Timer:null) (logid:7f9421ae) Restarting libvirt 
> after certificate provisioning/renewal
> 
> 2024-03-29 16:18:43,729 INFO  [cloud.agent.Agent] 
> (AgentShutdownThread:null)
> (logid:) Stopping the agent: Reason = sig.kill
> 
> 2024-03-29 16:18:43,730 WARN  [cloud.agent.Agent] (Certificate Renewal
> Timer:null) (logid:7f9421ae) Failed to execute post certificate 
> renewal
> command:
> 
> java.lang.IllegalStateException: Shutdown in progress
> 
>at
> java.base/java.lang.ApplicationShutdownHooks.remove(ApplicationShutdow
> nHooks
> .java:82)
> 
>at 
> java.base/java.lang.Runtime.removeShutdownHook(Runtime.java:244)
> 
>at
> com.cloud.agent.Agent$PostCertificateRenewalTask.runInContext(Agent.ja
> va:115
> 6)
> 
>at
> org.apache.cloudstack.managed.context.ManagedContextTimerTask$1.runInC
> ontext
> (ManagedContextTimerTask.java:30)
> 
>at
> org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(Man
> agedCo
> ntextRunnable.java:48)
> 
>at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.cal
> l(Defa
> ultManagedContext.java:55)
> 
>at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callW
> ithCon
> te

Re: Failed to execute post certificate renewal command - KVM 4.18.1

2024-03-30 Thread Vivek Kumar
Hello Cristian,

Have you added the hosts in cloudstack, and it’s showing unsecure in hosts 
section, ? And then you are trying to reprovision the security keys ? Is this 
the case ? 

Vivek Kumar
Sr. Manager - Cloud & DevOps
TechOps | Indiqus Technologies

vivek.ku...@indiqus.com 
www.indiqus.com 




> On 29-Mar-2024, at 9:53 PM, cristian.c@istream.today wrote:
> 
> Hello,
> 
> 
> 
>   Any idea how to get rid of this error? I try to provision security keys
> for this kvm host, but I end with this error :
> 
> 
> 
>   This is a new setup, with 4.18.1.0 on ubuntu 22.04, 1x host for
> management and 1x  KVM host.  
> 
> 
> 2024-03-29 16:16:19,879 INFO  [kvm.storage.LibvirtStorageAdaptor]
> (agentRequest-Handler-5:null) (logid:0c5006ba) Asking libvirt to refresh
> storage pool 552ecff0-1806-407d-8db6-f1c9da18c971
> 
> ^C
> 
> root@hv-001:/etc/cloudstack/agent# nano agent.properties
> 
> root@hv-001:/etc/cloudstack/agent# systemctl restart cloudstack-agent
> 
> root@hv-001:/etc/cloudstack/agent# tail -f
> /var/log/cloudstack/agent/agent.log
> 
> 2024-03-29 16:17:56,744 INFO  [cloud.agent.Agent] (Agent-Handler-2:null)
> (logid:) Process agent startup answer, agent id = 0
> 
> 2024-03-29 16:17:56,745 INFO  [cloud.agent.Agent] (Agent-Handler-2:null)
> (logid:) Set agent id 0
> 
> 2024-03-29 16:17:56,750 INFO  [cloud.agent.Agent] (Agent-Handler-2:null)
> (logid:) Startup Response Received: agent id = 0
> 
> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-3:null) (logid:5d6aaa47) Processing agent ready
> command, agent id = 1
> 
> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-3:null) (logid:5d6aaa47) Set agent id 1
> 
> 2024-03-29 16:17:56,965 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-3:null) (logid:5d6aaa47) Ready command is processed
> for agent id = 1
> 
> 2024-03-29 16:17:57,085 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-5:null) (logid:5d6aaa47) Processing agent ready
> command, agent id = 1
> 
> 2024-03-29 16:17:57,086 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-5:null) (logid:5d6aaa47) Set agent id 1
> 
> 2024-03-29 16:17:57,088 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-5:null) (logid:5d6aaa47) Processed new management
> server list: 51.xxx.xxx.69,10.111.0.1@static
> 
> 2024-03-29 16:17:57,088 INFO  [cloud.agent.Agent]
> (agentRequest-Handler-5:null) (logid:5d6aaa47) Ready command is processed
> for agent id = 1
> 
> 2024-03-29 16:18:20,157 INFO  [kvm.storage.LibvirtStorageAdaptor]
> (agentRequest-Handler-2:null) (logid:4be26651) Trying to fetch storage pool
> 552ecff0-1806-407d-8db6-f1c9da18c971 from libvirt
> 
> 2024-03-29 16:18:20,181 INFO  [kvm.storage.LibvirtStorageAdaptor]
> (agentRequest-Handler-2:null) (logid:4be26651) Asking libvirt to refresh
> storage pool 552ecff0-1806-407d-8db6-f1c9da18c971
> 
> 2024-03-29 16:18:43,714 INFO
> [resource.wrapper.LibvirtPostCertificateRenewalCommandWrapper] (Certificate
> Renewal Timer:null) (logid:7f9421ae) Restarting libvirt after certificate
> provisioning/renewal
> 
> 2024-03-29 16:18:43,729 INFO  [cloud.agent.Agent] (AgentShutdownThread:null)
> (logid:) Stopping the agent: Reason = sig.kill
> 
> 2024-03-29 16:18:43,730 WARN  [cloud.agent.Agent] (Certificate Renewal
> Timer:null) (logid:7f9421ae) Failed to execute post certificate renewal
> command:
> 
> java.lang.IllegalStateException: Shutdown in progress
> 
>at
> java.base/java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks
> .java:82)
> 
>at java.base/java.lang.Runtime.removeShutdownHook(Runtime.java:244)
> 
>at
> com.cloud.agent.Agent$PostCertificateRenewalTask.runInContext(Agent.java:115
> 6)
> 
>at
> org.apache.cloudstack.managed.context.ManagedContextTimerTask$1.runInContext
> (ManagedContextTimerTask.java:30)
> 
>at
> org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedCo
> ntextRunnable.java:48)
> 
>at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(Defa
> ultManagedContext.java:55)
> 
>at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithCon
> text(DefaultManagedContext.java:102)
> 
>at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithCont
> ext(DefaultManagedContext.java:52)
> 
>at
> org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedCont
> extRunnable.java:45)
> 
>at
> org.apache.cloudstack.managed.context.ManagedContextTimerTask.run(ManagedCon
> textTimerTask.java:32)
> 
>at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
> 
>at java.base/java.util.TimerThread.run(Timer.java:506)
> 
> 2024-03-29 16:18:45,061 INFO  [cloud.agent.AgentShell] (main:null) (logid:)
> Agent started
> 
> 2024-03-29 16:18:45,063 INFO  [cloud.agent.AgentShell] (main:null) (logid:)
> Implementation Version is 4.18.1.0
> 
> 2024-03-29 16:18:45,0