[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-12 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-472093475
 
 
   Closing this in favor of #3210


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-11 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-471790302
 
 
   @blueorangutan test


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-11 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-471778806
 
 
   @blueorangutan package


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-11 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-471755251
 
 
   @ustcweizhou sure, I will Squash when merging (with the Squash and merge).


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-11 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-471546051
 
 
   Fixed! Thanks for the help @andrijapanicsb!


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-11 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-471540220
 
 
   
   @andrijapanic the _pid is there at 4.11.2. However, I am not sure if the 
service was alrady migrate to _systemd_ at 4.11.2 or it was migrated in the 
4.11 branch after 4.11.2 was released.
   
https://github.com/apache/cloudstack/blob/4.11.2.0/usage/src/com/cloud/usage/UsageManagerImpl.java#L353


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-11 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-471539732
 
 
   
   @wido, as far as I know, the implementation used the pid to have a unique id 
regarding the cloudstack-usage.service (in case of multiple cloudstack-usage 
nodes running). To change this approach some refactoring is needed.
   
   Regarding the codebase (prior to this PR), the exception was happening at 
line 274 from UsageManagerImpl.java.
   `_pid = Integer.parseInt(System.getProperty("pid"));` and silenced at the 
UsageServer as it would print the stack only in case of running the service 
from the command line and not a systemd service (which was not the case for any 
of us). Explaining why the usage.log  did not print details and/or an exception.
   
   ```
   try {
   ComponentContext.initComponentsLifeCycle();
   } catch (Exception e) {
   e.printStackTrace();
   }
   ```
   
   If the _pid is not a valid pid for the service (for instance zero) the 
runInContextInternal execution flow is ignored.
   
   
https://github.com/apache/cloudstack/blob/1d05fead49f5c856257a741b07122f5633d2e359/usage/src/main/java/com/cloud/usage/UsageManagerImpl.java#L353
   
https://github.com/apache/cloudstack/blob/1d05fead49f5c856257a741b07122f5633d2e359/usage/src/main/java/com/cloud/usage/UsageManagerImpl.java#L354


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-11 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-471539574
 
 
   Thanks for the feedback @wido @andrijapanic @konstantinjfk @ustcweizhou!
   I have changed the pid file to /var/run/cloudstack-usage.service.pid.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 4.11/4.12

2019-03-10 Thread GitBox
GabrielBrascher commented on issue #3207: Fix #3203 usage server broken in 
4.11/4.12
URL: https://github.com/apache/cloudstack/pull/3207#issuecomment-471393067
 
 
   @blueorangutan package


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:
us...@infra.apache.org


With regards,
Apache Git Services