Interested for User friendly name of Downloaded Templates Volumes and ISOs Project

2023-03-28 Thread Aayush
Hello Team,
My Name is Aayush, Currently working as an SWE Intern at Red Hat, In Red
Hat, I have used Open Shift for a particular project and wants to explore
more about cloud computing via the apache cloud stack that's why  I am
Interested in this project. Can you please guide me a little bit over this?
I am unable to set up the project. I have understood the requirements
needed. It would be very helpful. So that I can make a draft proposal.
Sorry for being late.
My Experience:
* SWE Intern Red Hat [ Kafka, Java, Spring[
* Content Researcher and Problem Setter Geeks for Geeks.
* Open Source Contributor and Maintainer at Jenkins, Moja Global.
* GitHub Link: https://github.com/AayushSaini101
* GSOD 2022 Moja Global:
https://drive.google.com/file/d/1xX8xUFZVSkE0fNe6KLIezLHnHaPNH-Gb/view
Thank you
Aayush
LinkedIn: https://www.linkedin.com/in/aayush-saini-0a25931b1/


We are facing strange issue with acs 4.18 with Rocky Linux9

2023-03-28 Thread Sanjay Kumar
Hi All,

We have setup the lab acs 4.18 with Rocky linux 9 and it was running but
after a day we faced the issue. is there any OS dependencies with 4.18?



Could not add host at [http://10.40.40.71] with zone [1], pod [1] and
cluster [1] due to: [ can't setup agent, due to
com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore
on the KVM host: 10.40.40.71 - Failed to setup keystore on the KVM host:
10.40.40.71].


2023-03-27 10:09:11,382 DEBUG [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-3383eeb3) (logid:c03fe0a7) Detected management
node left, id:2, nodeIP:10.40.40.23
2023-03-27 10:09:11,382 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-3383eeb3) (logid:c03fe0a7) Trying to connect to
10.40.40.23
2023-03-27 10:09:11,383 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-3383eeb3) (logid:c03fe0a7) Management node 2 is
detected inactive by timestamp but is pingable
2023-03-27 10:09:12,882 DEBUG [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-ee783d0b) (logid:87ac62d2) Detected management
node left, id:2, nodeIP:10.40.40.23
2023-03-27 10:09:12,882 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-ee783d0b) (logid:87ac62d2) Trying to connect to
10.40.40.23
2023-03-27 10:09:12,882 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-ee783d0b) (logid:87ac62d2) Management node 2 is
detected inactive by timestamp but is pingable
2023-03-27 10:09:14,382 DEBUG [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Detected management
node left, id:2, nodeIP:10.40.40.23
2023-03-27 10:09:14,383 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Trying to connect to
10.40.40.23
2023-03-27 10:09:14,383 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Management node 2 is
detected inactive by timestamp but is pingable
2023-03-27 10:09:15,122 DEBUG [o.a.c.h.HAManagerImpl]
(BackgroundTaskPollManager-6:ctx-b26dd505) (logid:66b6c0db) HA health check
task is running...
[root@ASCLDACS01 ~]# tail
/var/log/cloudstack/management/management-server.log
2023-03-27 10:09:14,382 DEBUG [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Detected management
node left, id:2, nodeIP:10.40.40.23
2023-03-27 10:09:14,383 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Trying to connect to
10.40.40.23
2023-03-27 10:09:14,383 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Management node 2 is
detected inactive by timestamp but is pingable
2023-03-27 10:09:15,122 DEBUG [o.a.c.h.HAManagerImpl]
(BackgroundTaskPollManager-6:ctx-b26dd505) (logid:66b6c0db) HA health check
task is running...
2023-03-27 10:09:15,881 DEBUG [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-b3ca8d68) (logid:50c9cf85) Detected management
node left, id:2, nodeIP:10.40.40.23
2023-03-27 10:09:15,881 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-b3ca8d68) (logid:50c9cf85) Trying to connect to
10.40.40.23
2023-03-27 10:09:15,882 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-b3ca8d68) (logid:50c9cf85) Management node 2 is
detected inactive by timestamp but is pingable
2023-03-27 10:09:17,382 DEBUG [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-2dbaab99) (logid:7f3a46b4) Detected management
node left, id:2, nodeIP:10.40.40.23
2023-03-27 10:09:17,382 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-2dbaab99) (logid:7f3a46b4) Trying to connect to
10.40.40.23
2023-03-27 10:09:17,383 INFO  [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-2dbaab99) (logid:7f3a46b4) Management node 2 is
detected inactive by timestamp but is pingable


Any help you can give would be greatly appreciated



With Regards,

Sanjay


Re: We are facing strange issue with acs 4.18 with Rocky Linux9

2023-03-28 Thread Sanjay Kumar
  logs.zip



On Mon, Mar 27, 2023, 11:07 PM Wei ZHOU  wrote:

> Can you share the full log while added the host ?
>
> -Wei
>
>
>
> On Monday, 27 March 2023, Sanjay Kumar  wrote:
>
> > Hi All,
> >
> > We have setup the lab acs 4.18 with Rocky linux 9 and it was running but
> > after a day we faced the issue. is there any OS dependencies with 4.18?
> >
> >
> >
> > Could not add host at [http://10.40.40.71] with zone [1], pod [1] and
> > cluster [1] due to: [ can't setup agent, due to
> > com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore
> > on the KVM host: 10.40.40.71 - Failed to setup keystore on the KVM host:
> > 10.40.40.71].
> >
> >
> > 2023-03-27 10:09:11,382 DEBUG [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-3383eeb3) (logid:c03fe0a7) Detected management
> > node left, id:2, nodeIP:10.40.40.23
> > 2023-03-27 10:09:11,382 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-3383eeb3) (logid:c03fe0a7) Trying to connect to
> > 10.40.40.23
> > 2023-03-27 10:09:11,383 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-3383eeb3) (logid:c03fe0a7) Management node 2 is
> > detected inactive by timestamp but is pingable
> > 2023-03-27 10:09:12,882 DEBUG [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-ee783d0b) (logid:87ac62d2) Detected management
> > node left, id:2, nodeIP:10.40.40.23
> > 2023-03-27 10:09:12,882 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-ee783d0b) (logid:87ac62d2) Trying to connect to
> > 10.40.40.23
> > 2023-03-27 10:09:12,882 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-ee783d0b) (logid:87ac62d2) Management node 2 is
> > detected inactive by timestamp but is pingable
> > 2023-03-27 10:09:14,382 DEBUG [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Detected management
> > node left, id:2, nodeIP:10.40.40.23
> > 2023-03-27 10:09:14,383 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Trying to connect to
> > 10.40.40.23
> > 2023-03-27 10:09:14,383 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Management node 2 is
> > detected inactive by timestamp but is pingable
> > 2023-03-27 10:09:15,122 DEBUG [o.a.c.h.HAManagerImpl]
> > (BackgroundTaskPollManager-6:ctx-b26dd505) (logid:66b6c0db) HA health
> > check
> > task is running...
> > [root@ASCLDACS01 ~]# tail
> > /var/log/cloudstack/management/management-server.log
> > 2023-03-27 10:09:14,382 DEBUG [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Detected management
> > node left, id:2, nodeIP:10.40.40.23
> > 2023-03-27 10:09:14,383 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Trying to connect to
> > 10.40.40.23
> > 2023-03-27 10:09:14,383 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-1f50e525) (logid:a4ef06ad) Management node 2 is
> > detected inactive by timestamp but is pingable
> > 2023-03-27 10:09:15,122 DEBUG [o.a.c.h.HAManagerImpl]
> > (BackgroundTaskPollManager-6:ctx-b26dd505) (logid:66b6c0db) HA health
> > check
> > task is running...
> > 2023-03-27 10:09:15,881 DEBUG [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-b3ca8d68) (logid:50c9cf85) Detected management
> > node left, id:2, nodeIP:10.40.40.23
> > 2023-03-27 10:09:15,881 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-b3ca8d68) (logid:50c9cf85) Trying to connect to
> > 10.40.40.23
> > 2023-03-27 10:09:15,882 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-b3ca8d68) (logid:50c9cf85) Management node 2 is
> > detected inactive by timestamp but is pingable
> > 2023-03-27 10:09:17,382 DEBUG [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-2dbaab99) (logid:7f3a46b4) Detected management
> > node left, id:2, nodeIP:10.40.40.23
> > 2023-03-27 10:09:17,382 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-2dbaab99) (logid:7f3a46b4) Trying to connect to
> > 10.40.40.23
> > 2023-03-27 10:09:17,383 INFO  [c.c.c.ClusterManagerImpl]
> > (Cluster-Heartbeat-1:ctx-2dbaab99) (logid:7f3a46b4) Management node 2 is
> > detected inactive by timestamp but is pingable
> >
> >
> > Any help you can give would be greatly appreciated
> >
> >
> >
> > With Regards,
> >
> > Sanjay
> >
>


Error when uploading ISO and templates from local machine.

2023-03-28 Thread Marty Godsey
Hello Everyone,

Since uploading to 4.18.0, I have been getting an error when I try to use the 
upload image from the local machine. The GUI shows me error 502, while the log 
files say it's a validation error. If I import via URL, it works fine. This is 
only a 200MB ISO by the way.

Thoughts? This worked fine before.



Kubecon Approaching and 20% Discount on Registration

2023-03-28 Thread Ivet Petrova
Hello all,

I am just reminding that our community has been given access to a 20% discount 
code for KubeCon + CloudNativeCon 
2023.

The discount code is: KCEU23@APASB20

The event is taking place on 18-21st April, in Amsterdam, Netherlands. It is 
one of the largest flagship cloud conferences globally. For more information 
about the event, including Apache CloudStack’s sponsorship and exhibition, read 
our 
blog.
 If anybody else in the community will be at the event, please do let me know 
so I can spread the word to the community members who are representing 
CloudStack.

Reminder: The Apache CloudStack Project will be an exhibitor at KubeCon for the 
first time! So we would be happy to meet the community live in Netherlands!

Kind regards,


 



Re: Interested for User friendly name of Downloaded Templates Volumes and ISOs Project

2023-03-28 Thread Nicolas Vazquez
Hi Aayush,

Thanks for your contacting us. Please check my reply on the Github issue: 
https://github.com/apache/cloudstack/issues/6949, you can reach Alex or me over 
there if you have any issues.

Regards,
Nicolas Vazquez


From: Aayush 
Date: Tuesday, 28 March 2023 at 04:29
To: dev@cloudstack.apache.org 
Subject: Interested for User friendly name of Downloaded Templates Volumes and 
ISOs Project
Hello Team,
My Name is Aayush, Currently working as an SWE Intern at Red Hat, In Red
Hat, I have used Open Shift for a particular project and wants to explore
more about cloud computing via the apache cloud stack that's why  I am
Interested in this project. Can you please guide me a little bit over this?
I am unable to set up the project. I have understood the requirements
needed. It would be very helpful. So that I can make a draft proposal.
Sorry for being late.
My Experience:
* SWE Intern Red Hat [ Kafka, Java, Spring[
* Content Researcher and Problem Setter Geeks for Geeks.
* Open Source Contributor and Maintainer at Jenkins, Moja Global.
* GitHub Link: https://github.com/AayushSaini101
* GSOD 2022 Moja Global:
https://drive.google.com/file/d/1xX8xUFZVSkE0fNe6KLIezLHnHaPNH-Gb/view
Thank you
Aayush
LinkedIn: https://www.linkedin.com/in/aayush-saini-0a25931b1/

 



[GitHub] [cloudstack-documentation] andrijapanicsb commented on a diff in pull request #308: Add KVM Auto Enable-Disable Hosts docs

2023-03-28 Thread via GitHub


andrijapanicsb commented on code in PR #308:
URL: 
https://github.com/apache/cloudstack-documentation/pull/308#discussion_r1150769568


##
source/adminguide/hosts.rst:
##
@@ -1003,3 +1003,51 @@ The management server iterates through hosts in each 
cluster on the selected sco
   - In case the post-maintenance script fails and the ‘forced’ parameter is 
not set, then the rolling maintenance process fails and an error is reported. 
If the ‘forced’ parameter is set, the host is skipped and the iteration 
continues with the next host in the cluster
 
 - Enable the cluster that has been disabled, after all the hosts in the 
cluster have been processed, or in case an error has occurred.
+
+
+KVM Auto Enable/Disable Hosts
+-
+
+The cluster configuration 'enable.kvm.host.auto.enable.disable' (disabled by 
default) allows CloudStack to auto-disable and auto-enable KVM hosts resource 
state based on customisable host/hypervisor health checks.
+
+KVM hosts health checks
+~~~
+
+For each KVM agent on the cluster, the property 
'agent.health.check.script.path' must be added to the agent.properties file, 
indicating the path of an executable file/script for host health check.
+
+.. note:: The health script runs every 'ping.interval' seconds on a KVM host.
+
+.. note:: The health script will need execution permissions on a KVM host.
+
+Depending on the exit code of the health script, the KVM agent will report the 
management server with the following results:
+
+- The health check result is true, if the script is executed successfully and 
the exit code is 0
+- The health check result is false, if the script is executed successfully and 
the exit code is 1
+- The health check result is null, if
+
+   - Script file is not specified, or
+   - Script file does not exist, or
+   - Script file is not accessible by the user of the cloudstack-agent 
process, or
+   - Script file is not executable, or
+   - There are errors when the script is executed (exit codes other than 0 or 
1)
+
+Management Server actions based on health checks
+
+
+The management server receives the health check results from the KVM agent, 
and takes the following actions:
+
+- If the host health check result is null, do nothing.
+- If the host health check result is true, enable the host resource state if 
it is Disabled.
+- If the host health check result is false, disable the host resource state if 
it is Enabled.
+
+On every automatic enable or disable event, the management server will send an 
alert to the admin and add an automatic annotation (comment) on the specific 
host.
+
+- If a host gets auto-disabled by a health check failure, then it can be 
auto-enabled when the health check succeeds. But if the host gets disabled by 
the admin, then it must not be auto-enabled when the health check succeeds 
(manual host disabling takes precedence over the auto-enabling of a host).
+- If a host gets auto-disabled by a health check failure, the admin could 
enable the host but unless they also disable the health check on the host then 
it will just get disabled again when the health check fails
+
+CloudStack controls when a host can/cannot be auto-enabled or auto-disabled by 
a host detail record (on the host_details table) with key ‘autoenablekvmhost’, 
in the following way:
+
+- If a host is auto-enabled or auto-disabled and there is no host detail with 
key ‘autoenablekvmhost’ for that host, then a new host detail record is created 
with the key ‘autoenablekvmhost’ and is set to ‘true’ (just before the host is 
auto-enabled/auto-disabled)
+- If the administrator manually disables a host and there is a host detail 
with key ‘autoenablekvmhost’ for that host, then the host detail 
‘autoenablekvmhost’ is set to ‘false’ (indicating that the host cannot be 
auto-enabled if the health check succeeds)
+- If the administrator manually enables a host and there is a host detail with 
key ‘autoenablekvmhost’ for that host, then the host detail ‘autoenablekvmhost’ 
is set to ‘true’ (indicating that the host can be auto-disabled if the health 
check fails)
+- If the cluster setting 'enable.kvm.host.auto.enable.disable' is disabled, 
and the administrator enables/disables hosts in the cluster, then the host 
detail with key ‘autoenablekvmhost’ is not created for the hosts. (preserving 
the usual behavior). If the cluster setting is then enabled, and the 
administrator enables/disables the host manually then the host detail with key 
'‘autoenablekvmhost’ is created, and is set to false.

Review Comment:
   ```suggestion
   - If the cluster setting 'enable.kvm.host.auto.enable.disable' is disabled 
(by default), and the administrator enables/disables hosts in the cluster, then 
the host detail with key ‘autoenablekvmhost’ is not created for the hosts. 
(preserving the usual behavior). If the cluster setting is then enabled, and 
the administrator enables/dis

[GitHub] [cloudstack-documentation] andrijapanicsb commented on a diff in pull request #308: Add KVM Auto Enable-Disable Hosts docs

2023-03-28 Thread via GitHub


andrijapanicsb commented on code in PR #308:
URL: 
https://github.com/apache/cloudstack-documentation/pull/308#discussion_r1150769568


##
source/adminguide/hosts.rst:
##
@@ -1003,3 +1003,51 @@ The management server iterates through hosts in each 
cluster on the selected sco
   - In case the post-maintenance script fails and the ‘forced’ parameter is 
not set, then the rolling maintenance process fails and an error is reported. 
If the ‘forced’ parameter is set, the host is skipped and the iteration 
continues with the next host in the cluster
 
 - Enable the cluster that has been disabled, after all the hosts in the 
cluster have been processed, or in case an error has occurred.
+
+
+KVM Auto Enable/Disable Hosts
+-
+
+The cluster configuration 'enable.kvm.host.auto.enable.disable' (disabled by 
default) allows CloudStack to auto-disable and auto-enable KVM hosts resource 
state based on customisable host/hypervisor health checks.
+
+KVM hosts health checks
+~~~
+
+For each KVM agent on the cluster, the property 
'agent.health.check.script.path' must be added to the agent.properties file, 
indicating the path of an executable file/script for host health check.
+
+.. note:: The health script runs every 'ping.interval' seconds on a KVM host.
+
+.. note:: The health script will need execution permissions on a KVM host.
+
+Depending on the exit code of the health script, the KVM agent will report the 
management server with the following results:
+
+- The health check result is true, if the script is executed successfully and 
the exit code is 0
+- The health check result is false, if the script is executed successfully and 
the exit code is 1
+- The health check result is null, if
+
+   - Script file is not specified, or
+   - Script file does not exist, or
+   - Script file is not accessible by the user of the cloudstack-agent 
process, or
+   - Script file is not executable, or
+   - There are errors when the script is executed (exit codes other than 0 or 
1)
+
+Management Server actions based on health checks
+
+
+The management server receives the health check results from the KVM agent, 
and takes the following actions:
+
+- If the host health check result is null, do nothing.
+- If the host health check result is true, enable the host resource state if 
it is Disabled.
+- If the host health check result is false, disable the host resource state if 
it is Enabled.
+
+On every automatic enable or disable event, the management server will send an 
alert to the admin and add an automatic annotation (comment) on the specific 
host.
+
+- If a host gets auto-disabled by a health check failure, then it can be 
auto-enabled when the health check succeeds. But if the host gets disabled by 
the admin, then it must not be auto-enabled when the health check succeeds 
(manual host disabling takes precedence over the auto-enabling of a host).
+- If a host gets auto-disabled by a health check failure, the admin could 
enable the host but unless they also disable the health check on the host then 
it will just get disabled again when the health check fails
+
+CloudStack controls when a host can/cannot be auto-enabled or auto-disabled by 
a host detail record (on the host_details table) with key ‘autoenablekvmhost’, 
in the following way:
+
+- If a host is auto-enabled or auto-disabled and there is no host detail with 
key ‘autoenablekvmhost’ for that host, then a new host detail record is created 
with the key ‘autoenablekvmhost’ and is set to ‘true’ (just before the host is 
auto-enabled/auto-disabled)
+- If the administrator manually disables a host and there is a host detail 
with key ‘autoenablekvmhost’ for that host, then the host detail 
‘autoenablekvmhost’ is set to ‘false’ (indicating that the host cannot be 
auto-enabled if the health check succeeds)
+- If the administrator manually enables a host and there is a host detail with 
key ‘autoenablekvmhost’ for that host, then the host detail ‘autoenablekvmhost’ 
is set to ‘true’ (indicating that the host can be auto-disabled if the health 
check fails)
+- If the cluster setting 'enable.kvm.host.auto.enable.disable' is disabled, 
and the administrator enables/disables hosts in the cluster, then the host 
detail with key ‘autoenablekvmhost’ is not created for the hosts. (preserving 
the usual behavior). If the cluster setting is then enabled, and the 
administrator enables/disables the host manually then the host detail with key 
'‘autoenablekvmhost’ is created, and is set to false.

Review Comment:
   ```suggestion
   - If the feature was never enabled before 
('enable.kvm.host.auto.enable.disable' global and cluster settings having their 
default values) and the administrator enables/disables hosts in the cluster, 
then the host detail with key ‘autoenablekvmhost’ is not created for the hosts. 
(preserving the usual behavior). If the cluster setting i

[GitHub] [cloudstack-documentation] andrijapanicsb commented on a diff in pull request #308: Add KVM Auto Enable-Disable Hosts docs

2023-03-28 Thread via GitHub


andrijapanicsb commented on code in PR #308:
URL: 
https://github.com/apache/cloudstack-documentation/pull/308#discussion_r1150789701


##
source/adminguide/hosts.rst:
##
@@ -1003,3 +1003,51 @@ The management server iterates through hosts in each 
cluster on the selected sco
   - In case the post-maintenance script fails and the ‘forced’ parameter is 
not set, then the rolling maintenance process fails and an error is reported. 
If the ‘forced’ parameter is set, the host is skipped and the iteration 
continues with the next host in the cluster
 
 - Enable the cluster that has been disabled, after all the hosts in the 
cluster have been processed, or in case an error has occurred.
+
+
+KVM Auto Enable/Disable Hosts
+-
+
+The cluster configuration 'enable.kvm.host.auto.enable.disable' (disabled by 
default) allows CloudStack to auto-disable and auto-enable KVM hosts resource 
state based on customisable host/hypervisor health checks.
+
+KVM hosts health checks
+~~~
+
+For each KVM agent on the cluster, the property 
'agent.health.check.script.path' must be added to the agent.properties file, 
indicating the path of an executable file/script for host health check.
+
+.. note:: The health script runs every 'ping.interval' seconds on a KVM host.
+
+.. note:: The health script will need execution permissions on a KVM host.
+
+Depending on the exit code of the health script, the KVM agent will report the 
management server with the following results:
+
+- The health check result is true, if the script is executed successfully and 
the exit code is 0
+- The health check result is false, if the script is executed successfully and 
the exit code is 1
+- The health check result is null, if
+
+   - Script file is not specified, or
+   - Script file does not exist, or
+   - Script file is not accessible by the user of the cloudstack-agent 
process, or
+   - Script file is not executable, or
+   - There are errors when the script is executed (exit codes other than 0 or 
1)
+
+Management Server actions based on health checks
+
+
+The management server receives the health check results from the KVM agent, 
and takes the following actions:
+
+- If the host health check result is null, do nothing.
+- If the host health check result is true, enable the host resource state if 
it is Disabled.
+- If the host health check result is false, disable the host resource state if 
it is Enabled.
+
+On every automatic enable or disable event, the management server will send an 
alert to the admin and add an automatic annotation (comment) on the specific 
host.
+
+- If a host gets auto-disabled by a health check failure, then it can be 
auto-enabled when the health check succeeds. But if the host gets disabled by 
the admin, then it must not be auto-enabled when the health check succeeds 
(manual host disabling takes precedence over the auto-enabling of a host).
+- If a host gets auto-disabled by a health check failure, the admin could 
enable the host but unless they also disable the health check on the host then 
it will just get disabled again when the health check fails
+
+CloudStack controls when a host can/cannot be auto-enabled or auto-disabled by 
a host detail record (on the host_details table) with key ‘autoenablekvmhost’, 
in the following way:
+
+- If a host is auto-enabled or auto-disabled and there is no host detail with 
key ‘autoenablekvmhost’ for that host, then a new host detail record is created 
with the key ‘autoenablekvmhost’ and is set to ‘true’ (just before the host is 
auto-enabled/auto-disabled)
+- If the administrator manually disables a host and there is a host detail 
with key ‘autoenablekvmhost’ for that host, then the host detail 
‘autoenablekvmhost’ is set to ‘false’ (indicating that the host cannot be 
auto-enabled if the health check succeeds)
+- If the administrator manually enables a host and there is a host detail with 
key ‘autoenablekvmhost’ for that host, then the host detail ‘autoenablekvmhost’ 
is set to ‘true’ (indicating that the host can be auto-disabled if the health 
check fails)
+- If the cluster setting 'enable.kvm.host.auto.enable.disable' is disabled, 
and the administrator enables/disables hosts in the cluster, then the host 
detail with key ‘autoenablekvmhost’ is not created for the hosts. (preserving 
the usual behavior). If the cluster setting is then enabled, and the 
administrator enables/disables the host manually then the host detail with key 
'‘autoenablekvmhost’ is created, and is set to false.

Review Comment:
   This is the case where you explain how the key is NOT created while the 
setting was disabled (by default) - i.e. has never been enabled before - so the 
key does not exist and manual enable/disable will not create the key in 
host_details. 
   
   Should we perhaps reword this to something like what I proposed above? to 
make it more clear (to me it's no

[GitHub] [cloudstack-documentation] andrijapanicsb commented on pull request #308: Add KVM Auto Enable-Disable Hosts docs

2023-03-28 Thread via GitHub


andrijapanicsb commented on PR #308:
URL: 
https://github.com/apache/cloudstack-documentation/pull/308#issuecomment-1487120713

   LGTM (pls see that last comment/change request)


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack-documentation] nvazquez commented on a diff in pull request #308: Add KVM Auto Enable-Disable Hosts docs

2023-03-28 Thread via GitHub


nvazquez commented on code in PR #308:
URL: 
https://github.com/apache/cloudstack-documentation/pull/308#discussion_r1150808717


##
source/adminguide/hosts.rst:
##
@@ -1003,3 +1003,51 @@ The management server iterates through hosts in each 
cluster on the selected sco
   - In case the post-maintenance script fails and the ‘forced’ parameter is 
not set, then the rolling maintenance process fails and an error is reported. 
If the ‘forced’ parameter is set, the host is skipped and the iteration 
continues with the next host in the cluster
 
 - Enable the cluster that has been disabled, after all the hosts in the 
cluster have been processed, or in case an error has occurred.
+
+
+KVM Auto Enable/Disable Hosts
+-
+
+The cluster configuration 'enable.kvm.host.auto.enable.disable' (disabled by 
default) allows CloudStack to auto-disable and auto-enable KVM hosts resource 
state based on customisable host/hypervisor health checks.
+
+KVM hosts health checks
+~~~
+
+For each KVM agent on the cluster, the property 
'agent.health.check.script.path' must be added to the agent.properties file, 
indicating the path of an executable file/script for host health check.
+
+.. note:: The health script runs every 'ping.interval' seconds on a KVM host.
+
+.. note:: The health script will need execution permissions on a KVM host.
+
+Depending on the exit code of the health script, the KVM agent will report the 
management server with the following results:
+
+- The health check result is true, if the script is executed successfully and 
the exit code is 0
+- The health check result is false, if the script is executed successfully and 
the exit code is 1
+- The health check result is null, if
+
+   - Script file is not specified, or
+   - Script file does not exist, or
+   - Script file is not accessible by the user of the cloudstack-agent 
process, or
+   - Script file is not executable, or
+   - There are errors when the script is executed (exit codes other than 0 or 
1)
+
+Management Server actions based on health checks
+
+
+The management server receives the health check results from the KVM agent, 
and takes the following actions:
+
+- If the host health check result is null, do nothing.
+- If the host health check result is true, enable the host resource state if 
it is Disabled.
+- If the host health check result is false, disable the host resource state if 
it is Enabled.
+
+On every automatic enable or disable event, the management server will send an 
alert to the admin and add an automatic annotation (comment) on the specific 
host.
+
+- If a host gets auto-disabled by a health check failure, then it can be 
auto-enabled when the health check succeeds. But if the host gets disabled by 
the admin, then it must not be auto-enabled when the health check succeeds 
(manual host disabling takes precedence over the auto-enabling of a host).
+- If a host gets auto-disabled by a health check failure, the admin could 
enable the host but unless they also disable the health check on the host then 
it will just get disabled again when the health check fails
+
+CloudStack controls when a host can/cannot be auto-enabled or auto-disabled by 
a host detail record (on the host_details table) with key ‘autoenablekvmhost’, 
in the following way:
+
+- If a host is auto-enabled or auto-disabled and there is no host detail with 
key ‘autoenablekvmhost’ for that host, then a new host detail record is created 
with the key ‘autoenablekvmhost’ and is set to ‘true’ (just before the host is 
auto-enabled/auto-disabled)
+- If the administrator manually disables a host and there is a host detail 
with key ‘autoenablekvmhost’ for that host, then the host detail 
‘autoenablekvmhost’ is set to ‘false’ (indicating that the host cannot be 
auto-enabled if the health check succeeds)
+- If the administrator manually enables a host and there is a host detail with 
key ‘autoenablekvmhost’ for that host, then the host detail ‘autoenablekvmhost’ 
is set to ‘true’ (indicating that the host can be auto-disabled if the health 
check fails)
+- If the cluster setting 'enable.kvm.host.auto.enable.disable' is disabled, 
and the administrator enables/disables hosts in the cluster, then the host 
detail with key ‘autoenablekvmhost’ is not created for the hosts. (preserving 
the usual behavior). If the cluster setting is then enabled, and the 
administrator enables/disables the host manually then the host detail with key 
'‘autoenablekvmhost’ is created, and is set to false.

Review Comment:
   Great, this looks much clearer, incorporating changes



-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infr

Re: coming conflicts

2023-03-28 Thread Rohit Yadav
I see 7083 is merged already, and the changes would be limited to conflicts 
only if somebody doesn't follow the new convention on having the file ending 
with newline or not.

On 7131, I've added some comments. I'm more concerned about its risks and 
rewards, compared to the merge conflicts it may cause. If we're doing the log4j 
upgrade, should this also consider other related dependencies such as gson?

Thanks and regards.


From: Wei ZHOU 
Sent: Monday, March 27, 2023 13:15
To: dev@cloudstack.apache.org 
Subject: Re: coming conflicts

this might cause a lot of work when merge 4.17/4.18 into main branch as well





 

On Mon, 27 Mar 2023 at 08:51, Daan Hoogland  wrote:

> Devs,
> There are two PRs [1][2] to be merged soon that have several hundreds of
> files involved. One is to unify the line-endings and the other one to
> (finaly) upgrade log4j. please beware that this is going to cause you to
> resolve conflicts in your PRs.
>
> regards,
>
> [1] https://github.com/apache/cloudstack/pull/7083
> [2] https://github.com/apache/cloudstack/pull/7131
>
> --
> Daan
>


[GitHub] [cloudstack-documentation] nvazquez commented on pull request #308: Add KVM Auto Enable-Disable Hosts docs

2023-03-28 Thread via GitHub


nvazquez commented on PR #308:
URL: 
https://github.com/apache/cloudstack-documentation/pull/308#issuecomment-1487161827

   @blueorangutan docbuild


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack-documentation] blueorangutan commented on pull request #308: Add KVM Auto Enable-Disable Hosts docs

2023-03-28 Thread via GitHub


blueorangutan commented on PR #308:
URL: 
https://github.com/apache/cloudstack-documentation/pull/308#issuecomment-1487163797

   @nvazquez a Jenkins job has been kicked to build the document. I'll keep you 
posted as I make progress.


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [cloudstack-documentation] blueorangutan commented on pull request #308: Add KVM Auto Enable-Disable Hosts docs

2023-03-28 Thread via GitHub


blueorangutan commented on PR #308:
URL: 
https://github.com/apache/cloudstack-documentation/pull/308#issuecomment-1487166022

   QA-Doc build preview: https://qa.cloudstack.cloud/builds/docs-build/pr/308. 
(QA-JID 69)


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org