GabrielBrascher commented on a change in pull request #3207: Fix #3203 usage 
server broken in 4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#discussion_r264234414
 
 

 ##########
 File path: usage/src/main/java/com/cloud/usage/UsageManagerImpl.java
 ##########
 @@ -271,10 +282,41 @@ public boolean configure(String name, Map<String, 
Object> params) throws Configu
             s_logger.error("Unhandled exception configuring UsageManger", e);
             throw new ConfigurationException("Unhandled exception configuring 
UsageManager " + e.toString());
         }
-        _pid = Integer.parseInt(System.getProperty("pid"));
+
+        configureUsageManagerServicePid();
         return true;
     }
 
+    /**
+     * Sets the '_pid' variable based on the cloudstack-usage.service process 
id (pid) according to the file /var/run/cloudstack-usage.service.pid. </br>
+     * It thorws a CloudRuntimeException in the following cases:
 
 Review comment:
   I will push another commit to fix the typo **thorws**.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to