Uh oh!
There was an error while loading. Please reload this page.
CLOUDSTACK-8855 Improve Error Message for Host Alert State and reconnect host API. - #2387
Conversation
yadvr
commented
Jan 5, 2018
@blueorangutan package |
blueorangutan
commented
Jan 5, 2018
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jan 5, 2018
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1596 |
yadvr
left a comment
There was a problem hiding this comment.
Can you also fix conflicts @rafaelweingartner ?
| HostResponse response = _responseGenerator.createHostResponse(result); | ||
| response.setResponseName(getCommandName()); | ||
| this.setResponseObject(response); | ||
| }catch (InvalidParameterValueException e) { |
There was a problem hiding this comment.
Space between catch and closing brace?
| }catch (InvalidParameterValueException e) { | ||
| throw new ServerApiException(ApiErrorCode.PARAM_ERROR, e.getMessage()); | ||
| } | ||
| catch (CloudRuntimeException e) { |
There was a problem hiding this comment.
Fix this to be one same line as closing brace }
| catch (CloudRuntimeException e) { | ||
| s_logger.warn("Exception: ", e); | ||
| throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); | ||
| }catch (AgentUnavailableException e) { |
rafaelweingartner
commented
Jan 7, 2018
@rhtyd thanks for spotting that! |
901cfc9 to
9cb40d8Compare0f744cd to
00ae7eeComparerafaelweingartner
commented
Jan 27, 2018
@DaanHoogland and @marcaurele these last two days I have been working to fix all conflicts and rebase my PRs against the new master. However, this one that we were working together I did not understand why one of the travis tests are failing. Could you guys lend me your fresh eyes here? |
DaanHoogland
commented
Jan 27, 2018
I restarted the travis run. I don't see any reason but there is some link; the test is a certificate error and the changes are involving reconnects , might be a travis error, though. |
DaanHoogland
commented
Feb 7, 2018
@bvbharatk care to review this? |
rafaelweingartner
commented
Mar 1, 2018
@DaanHoogland I fixed that test that was not working. I isolated it, and then everything started working just fine. I think it was a concurrency problem. @marcaurele would you mind finish the review here? |
rafaelweingartner
commented
Mar 6, 2018
@borisstoyanov could you run tests here? |
borisstoyanov
commented
Mar 6, 2018
@blueorangutan package |
blueorangutan
commented
Mar 6, 2018
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Mar 6, 2018
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-1760 |
borisstoyanov
commented
Mar 6, 2018
@blueorangutan test |
blueorangutan
commented
Mar 6, 2018
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Mar 7, 2018
Trillian test result (tid-2327)
|
rafaelweingartner
commented
Mar 7, 2018
@borisroman are those errors/failures ok? |
borisstoyanov
commented
Mar 7, 2018
Let me run smoke tests again, but I think we've seen them quite frequently on random PRs. |
blueorangutan
commented
Mar 7, 2018
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
rafaelweingartner
commented
Mar 7, 2018
ok, thanks. |
DaanHoogland
commented
Mar 8, 2018
@rafaelweingartner i did i think but my approval is kind of stale. Let me find time to revisit it, please |
rafaelweingartner
commented
Mar 8, 2018
Sure, no problem. |
rafaelweingartner
commented
Mar 12, 2018
@DaanHoogland since your approval the code did not change. I only isolated a smoke test case that was causing problems. |
DaanHoogland
commented
Mar 13, 2018
@rafaelweingartner sorry for sickness and €dayjob preventing me to review again, can you resolve conflicts? |
Remove declaration of throws CloudRuntimeException I also removed some unused variables and comments left behind This closesapache#837
rafaelweingartner
commented
Mar 13, 2018
@DaanHoogland done. |
| _agentMgr.reconnect(host.getId()); | ||
| try { | ||
| _agentMgr.reconnect(host.getId()); | ||
| } catch (Exception e ) { |
There was a problem hiding this comment.
This pokemon was caught with the next commit :)
| **/ | ||
| public class AgentManagerImpl extends ManagerBase implements AgentManager, HandlerFactory, Configurable { | ||
| protected static final Logger s_logger = Logger.getLogger(AgentManagerImpl.class); | ||
| protected static final Logger status_logger = Logger.getLogger(Status.class); |
There was a problem hiding this comment.
this seems a functional backwards incompatible change. Did you considder that?
There was a problem hiding this comment.
Yes, I did. It is a change in the logging class that is used on the left side of the log message in the log file. People normally lock down their log parse in the message per se, but for sure if they are considering the class as well, this can break things.
I changed this for a simple reason. It is misleading. It will show as if the “Status” class is generating that message, which is not true. I see no reason for this type of code.
I can revert this change, but my position is that it does not make sense. It is not used consistently. The same type of message is being logged also with the other logger.
There was a problem hiding this comment.
I agree it is a corner case and we can revert that if someone complains but it is an interface of the system, through the log configuration.
I am fine with it, just wanted to be sure you realised. Also so we have a placeholder to easily find where to fix if someone complains
| public class AlertManagerImpl extends ManagerBase implements AlertManager, Configurable { | ||
| private static final Logger s_logger = Logger.getLogger(AlertManagerImpl.class.getName()); | ||
| private static final Logger s_alertsLogger = Logger.getLogger("org.apache.cloudstack.alerts"); |
There was a problem hiding this comment.
another interface change! Please realise that this is incompatible!
There was a problem hiding this comment.
I do not consider this as an interface, explanation is above.
rafaelweingartner
commented
Mar 14, 2018
@DaanHoogland thank you very much! We will finally push this PR forward. |
blueorangutan
commented
Mar 15, 2018
Trillian test result (tid-2373)
|
Refatoração nos _parsers_ do Usage Closesapache#1056, apache#2373, and apache#2387 See merge request scclouds/scclouds!966
@DaanHoogland and @marcaurele I opened a new PR because it gets easier for me to fix problems and conflicts that may appear.
This closes#2380
This also closes#837