Michal Skrivanek has posted comments on this change.
Change subject: agent: Send non-blocking uninstalled notification without python
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File ovirt-guest-agent.spec
Line 127: /bin/systemctl stop ovirt-guest-agent.service > /dev/null 2>&1
Line 128:
Line 129: # Send an "uninstalled" notification to vdsm.
Line 130: VIRTIO=`grep "^device" %{_sysconfdir}/ovirt-guest-agent.conf |
awk '{ print $3; }'`
Line 131: if [ -w $VIRTIO ]
I'd log the "else" case. Just so we know for potential troubleshooting....
Line 132: then
Line 133: # Non blocking uninstalled notification
Line 134: echo -e '{"__name__": "uninstalled"}\n' | dd of=$VIRTIO \
Line 135: oflag=nonblock status=noxfer conv=nocreat 1>& /dev/null
|| :
Line 130: VIRTIO=`grep "^device" %{_sysconfdir}/ovirt-guest-agent.conf |
awk '{ print $3; }'`
Line 131: if [ -w $VIRTIO ]
Line 132: then
Line 133: # Non blocking uninstalled notification
Line 134: echo -e '{"__name__": "uninstalled"}\n' | dd of=$VIRTIO \
I'm not sure about other Linux's support for status=noxfer. I'm also not aware
of any flavor of dd doing any kind of conv by default, so I'd drop it. And the
noxfer thing...well, I'd just redirect both stdin and stderr to /dev/null and
that's it:)
Even though most likely a flavor of dd not supporting "status" won't support
"nonblock" anyway
Line 135: oflag=nonblock status=noxfer conv=nocreat 1>& /dev/null
|| :
Line 136: fi
Line 137: fi
Line 138:
Line 131: if [ -w $VIRTIO ]
Line 132: then
Line 133: # Non blocking uninstalled notification
Line 134: echo -e '{"__name__": "uninstalled"}\n' | dd of=$VIRTIO \
Line 135: oflag=nonblock status=noxfer conv=nocreat 1>& /dev/null
|| :
btw what is this "|| :" good for?
Line 136: fi
Line 137: fi
Line 138:
Line 139: %postun common
--
To view, visit http://gerrit.ovirt.org/13612
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8b2f84d56377ba4ba42ee206966b7b68deae7fc9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-guest-agent
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches