Bug 1870047
| Summary: | [Assisted-4.5][Agent] Log message is not informative enough when agent failed to register | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Lital Alon <lalon> |
| Component: | assisted-installer | Assignee: | Ori Amizur <oamizur> |
| assisted-installer sub component: | discovery-agent | QA Contact: | Yuri Obshansky <yobshans> |
| Status: | CLOSED CURRENTRELEASE | Docs Contact: | |
| Severity: | high | ||
| Priority: | high | CC: | aos-bugs, ukalifon, vlaad |
| Version: | 4.5 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | OCP-Metal-v1.0.9 | ||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-08-25 21:24:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Lital Alon
2020-08-19 09:28:53 UTC
*** Bug 1866344 has been marked as a duplicate of this bug. *** When we output the message about host not being able to register to the assisted-service we should also output why it cannot register. In Assisted-Service we have the information, and we should pass it back to the agent so it will be printed to the logs Actually, there is not any additional information why the registration failed. The error is returned from the go-swagger generated code.
This is the format of the log-message:
s.Logger().Warnf("Error registering host: %s", err.Error())
It is not one of the known responses from swagger.
After talking with lalon, it seems that the displayed messages are actually truncated. When viewing messages with journalct, messages are truncated on the screen. To view the rest of the messages, the user has to scroll right. So, the messages above are actually truncated messages, that the remainder of the messages are not displayed For example, this is how a similar message is displayed: Jun 08 09:13:55 localhost.localdomain agent[344837]: time="08-06-2020 06:13:55" level=warning msg="Error registering host: Post http://127.0.0.1:8080/api/assisted-install/v1/clusters/11111111-1111-1111-1111-111111111111/hosts: read tcp 127.0.0.1:57180->127.0.0.1:8080: read: connection reset by peer" file="register_node.go:34" request_id=ae50c7a0-4085-4100-96d9-54d20e76e82c This issue was used for agent logging improvements. PRs: https://github.com/openshift/assisted-installer-agent/pull/32 https://github.com/openshift/assisted-installer-agent/pull/33 Verified on Staging, Sep16, v1.0.39 |