nvazquez commented on code in PR #6348:
URL: https://github.com/apache/cloudstack/pull/6348#discussion_r910534428


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -1145,20 +1055,19 @@ public boolean configure(final String name, final 
Map<String, Object> params) th
         }
 
         // Enable/disable IO driver for Qemu (in case it is not set CloudStack 
can also detect if its supported by qemu)
-        // Do not remove - switching it to AgentProperties.Property may 
require accepting null values for the properties default value
-        String enableIoUringConfig = (String) 
params.get(ENABLE_IO_URING_PROPERTY);
+        boolean enableIoUringConfig = 
AgentPropertiesFileHandler.getPropertyValue(AgentProperties.ENABLE_IO_URING);

Review Comment:
   I have not tested it but in this case the default value is null, can we 
change the variable type to Boolean instead?



##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -322,7 +323,6 @@ public class LibvirtComputingResource extends 
ServerResourceBase implements Serv
     public static final String SSHPUBKEYPATH = SSHKEYSPATH + File.separator + 
"id_rsa.pub.cloud";
     public static final String DEFAULTDOMRSSHPORT = "3922";
 
-    public final static String HOST_CACHE_PATH_PARAMETER = 
"host.cache.location";
     public final static String CONFIG_DIR = "config";
     private boolean enableIoUring;
     private final static String ENABLE_IO_URING_PROPERTY = "enable.io.uring";

Review Comment:
   This one can be removed



##########
agent/src/main/java/com/cloud/agent/properties/AgentProperties.java:
##########
@@ -26,41 +26,699 @@
 public class AgentProperties{
 
     /**
-     * Heartbeat update timeout. <br>
-     * Data type: int. <br>
-     * Default value: 60000 (ms).
+     * MANDATORY: The GUID to identify the agent with.<br>
+     * Generated with "uuidgen".<br>
+     * Data type: String.<br>
+     * Default value: <code>null</code>
+     */
+    public static final Property<String> GUID = new Property<String>("guid", 
null, String.class);
+
+    /**
+     * The java class which the agent loads to execute.<br>
+     * Data type: String.<br>
+     * Default value: 
<code>com.cloud.hypervisor.kvm.resource.LibvirtComputingResource</code>
+     */
+    public static final Property<String> RESOURCE = new 
Property<String>("resource", 
"com.cloud.hypervisor.kvm.resource.LibvirtComputingResource");
+
+    /**
+     * The number of threads running in the agent.<br>
+     * Data type: Integer.<br>
+     * Default value: <code>5</code>
+     */
+    public static final Property<Integer> WORKERS = new 
Property<Integer>("workers", 5);
+
+    /**
+     * The IP address of the management server.<br>
+     * Data type: String.<br>
+     * Default value: <code>localhost</code>
+     */
+    public static final Property<String> HOST = new Property<String>("host", 
"localhost");
+
+    /**
+     * The time interval (in seconds) after which the agent will check if the 
connected host is the preferred host.<br>
+     * After that interval, if the agent is connected to one of the 
secondary/backup hosts, it will attempt to reconnect to the preferred host.<br>
+     * For more information see the agent.properties file.<br>
+     * Data type: Integer.<br>
+     * Default value: <code>null</code>
+     */
+    public static final Property<Integer> HOST_LB_CHECK_INTERVAL = new 
Property<Integer>("host.lb.check.interval", null, Integer.class);

Review Comment:
   Same for this one



##########
agent/src/main/java/com/cloud/agent/properties/AgentProperties.java:
##########
@@ -26,41 +26,699 @@
 public class AgentProperties{
 
     /**
-     * Heartbeat update timeout. <br>
-     * Data type: int. <br>
-     * Default value: 60000 (ms).
+     * MANDATORY: The GUID to identify the agent with.<br>
+     * Generated with "uuidgen".<br>
+     * Data type: String.<br>
+     * Default value: <code>null</code>
+     */
+    public static final Property<String> GUID = new Property<String>("guid", 
null, String.class);
+
+    /**
+     * The java class which the agent loads to execute.<br>
+     * Data type: String.<br>
+     * Default value: 
<code>com.cloud.hypervisor.kvm.resource.LibvirtComputingResource</code>
+     */
+    public static final Property<String> RESOURCE = new 
Property<String>("resource", 
"com.cloud.hypervisor.kvm.resource.LibvirtComputingResource");
+
+    /**
+     * The number of threads running in the agent.<br>
+     * Data type: Integer.<br>
+     * Default value: <code>5</code>
+     */
+    public static final Property<Integer> WORKERS = new 
Property<Integer>("workers", 5);

Review Comment:
   I think this could be used on the AgentShell class where some settings are 
parsed



-- 
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]

Reply via email to