Bug 1574433 - "Invalid data received during bootstrap" errors do not log the invalid data
Summary: "Invalid data received during bootstrap" errors do not log the invalid data
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: otopi
Classification: oVirt
Component: Bindings.Java
Version: 1.6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.4
: 1.7.8
Assignee: Yedidyah Bar David
QA Contact: Jiri Belka
URL:
Whiteboard:
Depends On:
Blocks: otopi-1.7.8
TreeView+ depends on / blocked
 
Reported: 2018-05-03 10:32 UTC by Yedidyah Bar David
Modified: 2018-06-26 08:45 UTC (History)
3 users (show)

Fixed In Version: otopi-1.7.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-26 08:45:59 UTC
oVirt Team: Integration
rule-engine: ovirt-4.2+
rule-engine: exception+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1559029 0 high CLOSED nodectl motd breaks host-deploy 2021-06-10 15:53:16 UTC
oVirt gerrit 90873 0 master MERGED java: Log invalid data as error 2018-05-07 07:49:32 UTC
oVirt gerrit 90956 0 otopi-1.7 MERGED java: Log invalid data as error 2018-05-17 10:10:24 UTC

Internal Links: 1559029

Description Yedidyah Bar David 2018-05-03 10:32:19 UTC
Description of problem:

If host-deploy fails due to invalid data right at the beginning, such as the remote host outputs some unrelated text for any reason, the machine dialog parser fails with the error "Invalid data received during bootstrap".

If the engine was configured to log at debug level, we also log "Got: " and the input, but only the first (invalid) line.

otopi should log the invalid line at level "error", so that it's always logged, and log some more lines from the input to help debug failures.

Version-Release number of selected component (if applicable):

All versions

How reproducible:

Always

Steps to Reproduce:
1. Install and setup oVirt engine on some machine, and plain OS (el7) on another, a host.
2. On the host: mkdir /etc/otopi.env.d; printf "echo\necho Bad input\n" > /etc/otopi.env.d/bad-input.sh
3. Try to add the host to the engine

Actual results:

Fails with error "Invalid data received during bootstrap" and "Cannot parse input", but not with "Bad input". If engine logs at debug level, the log will only contain "Got: ".

Expected results:

Fails, and the log contains also "Bad input".

Additional info:

Comment 1 Yaniv Kaul 2018-05-14 15:58:14 UTC
Severity...?

Comment 2 Yedidyah Bar David 2018-05-15 06:43:42 UTC
(In reply to Yaniv Kaul from comment #1)
> Severity...?

It's not a blocker, as in - it does not break any positive functionality.

However, over the years we had quite many host-deploy failures that would have been easier to debug if we had fixed current bug. I opened it now after having yet another one, see the "See also" bug.

It's already merged to master, and 1.7 (4.2) is only blocked because it fails on fedora, as we didn't want to pollute 1.7 branch with the many fixes for fedora we merged to master. I hope to handle this soon and intend to have this fix for 4.2.4.

Setting Medium/Medium. Feel free to change.

Comment 3 Yedidyah Bar David 2018-06-04 07:58:46 UTC
(In reply to Yedidyah Bar David from comment #0)
> 2. On the host: mkdir /etc/otopi.env.d; printf "echo\necho Bad input\n" >
> /etc/otopi.env.d/bad-input.sh

Sorry, should be:

mkdir /etc/otopi.env.d; printf "echo\necho Bad input\n" > /etc/otopi.env.d/bad-input.env

Comment 4 Jiri Belka 2018-06-04 08:13:08 UTC
ok, otopi-1.7.8-1.el7ev.noarch

# grep -Eai 'AuditLogDirector.*EVENT_ID' /var/log/ovirt-engine/engine.log  | tail -n3
2018-06-04 10:09:13,064+02 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-34) [6bce7467] EVENT_ID: VDS_INSTALL_IN_PROGRESS(509), Installing Host 10-37-137-227.example.com. Connected to host 10-37-137-227.example.com with SSH key fingerprint: SHA256:sOdd7UQKaS9VTtDp2jv+dT7YoEWVgR2trdDpM7oZfe8.
2018-06-04 10:09:14,807+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-34) [6bce7467] EVENT_ID: VDS_INSTALL_IN_PROGRESS_ERROR(511), An error has occurred during installation of Host 10-37-137-227.example.com: Invalid data received during bootstrap.
2018-06-04 10:09:14,821+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-34) [6bce7467] EVENT_ID: VDS_INSTALL_FAILED(505), Host 10-37-137-227.example.com installation failed. Invalid data received during bootstrap.

# grep -ai 'bad.*input' /var/log/ovirt-engine/engine.log 
2018-06-04 10:09:13,532+02 ERROR [org.ovirt.otopi.dialog.MachineDialogParser] (VdsDeploy) [6bce7467] Invalid data: 'Bad input'

Comment 5 Sandro Bonazzola 2018-06-26 08:45:59 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.