microsoft / OMS-Agent-for-Linux

http://www.microsoft.com/oms
Other
406 stars 312 forks source link

Update Management: Zypper not using the --non-interactive switch #664

Open aydeisen opened 6 years ago

aydeisen commented 6 years ago

Today, I attempted to patch SUSE 11 and 12 machines using Update Management. They all failed with the following error:

|   Abort, retry, ignore? [a/r/i/? shows all options] (a): Cannot read input: bad stream or EOF.
|   If you run zypper without a terminal, use '--non-interactive' global
|   option to make zypper use default answers to prompts.

Is this something that needs to be configured in the Update Management scripts included with OMS?

shipram commented 6 years ago

The update management scripts do use the --non-interactive command for zypper. 1) Can you share the detailed log from the machine that you ran it on - it should be at /var/opt/microsoft/omsagent/run/automationworker/omsupdatemgmt.log 2) Can you run one of the updates that fail, locally on the box using the command in the above log? That log will have exact details of what we tried to run and the error it failed with. So if you try to simulate the same command on the box and report back with behavior, that would be great. Thanks!

aydeisen commented 6 years ago

@shipram I'll coordinate with the server administrator to get the logs from the affected machine, as I only have visibility from the OMS logs. On a number of machines, the license had expired, so SUSE did not have access to the repo. However, I'm unclear as to why this error would have been thrown in addition to that one.

Is the way the output come into Azure also a function of the agent? The fact that each console line is a separate entry instead of streaming the entire message into a single entry in the Azure makes troubleshooting Linux machines using the Update Management solution really difficult.