Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: utils: rmFile() should be able to rm files on Node ......................................................................
utils: rmFile() should be able to rm files on Node
Currently rmFile() doesn't remove file persisted in oVirt Node. This patch will add this functionality.
Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Signed-off-by: Douglas Schilling Landgraf dougsland@redhat.com --- M vdsm/utils.py 1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/6634/1 -- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com
Douglas Schilling Landgraf has posted comments on this change.
Change subject: BZ#842948: utils.rmFile() remove oVirt Node Files ......................................................................
Patch Set 2: Verified
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#842948: utils.rmFile() remove oVirt Node Files ......................................................................
Patch Set 2: I would prefer that you didn't submit this
the effect of this change is too widespread: I would not like to do these globbing on each rmFile; and I would not like to change the overall semantics of rmFile on ovirt.
On the specific occasion, where you want to unpersist a file before removing it - please call unpersist directly.
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Douglas Schilling Landgraf has posted comments on this change.
Change subject: BZ#842948: _removeFile() safe delete Node file ......................................................................
Patch Set 3: Verified
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Douglas Schilling Landgraf has posted comments on this change.
Change subject: BZ#842948: _removeFile() safe delete Node file ......................................................................
Patch Set 3: I would prefer that you didn't submit this
new version will come
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Douglas Schilling Landgraf has posted comments on this change.
Change subject: BZ#842948: _removeFile() safe delete Node file ......................................................................
Patch Set 4: Verified
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#842948: _removeFile() safe delete Node file ......................................................................
Patch Set 4: I would prefer that you didn't submit this
we cannot change the (somewhat bizarre) semantics of _removeFile. It intentionally removes only the ramdisk file, leaving the persistent copy behind.
If you want to remove a network persistently, you have to start with delNetwork; to persist this, call vdsm-store-net-config, or use ovirt_safe_delete_config directly.
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Douglas Schilling Landgraf has posted comments on this change.
Change subject: BZ#842948: deployUtil - safely remove bridge ......................................................................
Patch Set 5: Verified
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#842948: deployUtil - safely remove bridge ......................................................................
Patch Set 5: I would prefer that you didn't submit this
(2 inline comments)
.................................................... File vdsm_reg/deployUtil.py.in Line 908: if isOvirt(): we are already under fIsOvirt==True (see line 898 above) so no need for this repetition.
Line 909: ovirtfunctions.ovirt_safe_delete_config(''.join([IFACE_CONFIG, mgtBridge])) I do not see any benefit of this join over a simple '+'.
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Alon Bar-Lev alonbl@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Douglas Schilling Landgraf has posted comments on this change.
Change subject: BZ#842948: deployUtil - safely remove bridge ......................................................................
Patch Set 6: Verified
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Alon Bar-Lev alonbl@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: BZ#842948: deployUtil - safely remove bridge ......................................................................
BZ#842948: deployUtil - safely remove bridge
deployUtil calls /usr/share/vdsm/delNetwork to remove previously created bridge. This patch will add ovirtfunctions.ovirt_safe_delete_config() to safely remove bridge config files in oVirt Node.
Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Signed-off-by: Douglas Schilling Landgraf dougsland@redhat.com --- M vdsm_reg/deployUtil.py.in 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: Douglas Schilling Landgraf: Verified Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Alon Bar-Lev alonbl@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#842948: deployUtil - safely remove bridge ......................................................................
Patch Set 6: Looks good to me, approved
I can live with this, but still: why not call vdsm-store-net-config, so that vlan/bond/nic would be deleted, too?
Anyway, since vlan/bond are not really used by ovirt-node, this can be taken in as-is and think about the issue later.
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Alon Bar-Lev alonbl@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
Douglas Schilling Landgraf has posted comments on this change.
Change subject: BZ#842948: deployUtil - safely remove bridge ......................................................................
Patch Set 7:
I don't think vdsm-store-net-config really works these days for oVirt Node. (I tested as well instead of ovirt_safe_delete_config())
The code shows:
NET_CONF_DIR='/etc/sysconfig/network-scripts/' NET_CONF_BACK_DIR=/var/lib/vdsm/netconfback
for f in "$NET_CONF_BACK_DIR"/*; if [ -f "$NET_CONF_DIR/$bf" ]; then ovirt_store_config "$NET_CONF_DIR/$bf" else ovirt_safe_delete_config "$NET_CONF_DIR/$bf"
However, using unpersist/rm or ovirt-functions to remove the bridge file this what happens:
# unpersist ifcfg-breth0 # rm -f ifcfg-breth0 rm: cannot remove `ifcfg-breth0': Device or resource busy # ls ifcfg-breth0 ifcfg-breth0
# . /usr/libexec/ovirt-functions # ovirt_safe_delete_config ifcfg-breth0 # ls ifcfg-breth0 ifcfg-breth0
The file will only be removed from the filesystem in the next reboot.
In other words, the else statement will never be reached:
if [ -f "$NET_CONF_DIR/$bf" ]; then ovirt_store_config "$NET_CONF_DIR/$bf" else ovirt_safe_delete_config "$NET_CONF_DIR/$bf"
Any suggestion? maybe Mike? Am I missing something?
-- To view, visit http://gerrit.ovirt.org/6634 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Alon Bar-Lev alonbl@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Michael Burns mburns@redhat.com
vdsm-patches@lists.fedorahosted.org