Alon Bar-Lev has uploaded a new change for review. Change subject: bootstrap: ovirt-node upgrade: create destination directory ......................................................................
bootstrap: ovirt-node upgrade: create destination directory One would expect that there will be an ovirt-node upgrade script, however there is none, and the /data/updates is vdsm specific path, which was created by vdsm init script, and then creation was moved to vdsm-reg service. vdsm-reg is going to be retired soon, so move the creation of this directory to the component that sends the iso image. Better solution would be a node upgrade script that receives the image via stdin. Change-Id: I5519bd63383feba9b3bf971543b0d630c24bbca0 Signed-off-by: Alon Bar-Lev <alo...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OVirtNodeUpgrade.java 1 file changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/9524/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OVirtNodeUpgrade.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OVirtNodeUpgrade.java index 91e289f..ca30754 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OVirtNodeUpgrade.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OVirtNodeUpgrade.java @@ -1,6 +1,7 @@ package org.ovirt.engine.core.bll; import java.io.BufferedReader; +import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; @@ -161,6 +162,36 @@ ) ); + /* + * Create the directory where + * file is stored, in the past + * it was done by vdsm, then vdsm-reg + * well, as we use hard coded path + * we can as well do this, until we + * have proper node upgrade script + * that can take the image from stdin. + */ + _dialog.executeCommand( + new SSHDialog.Sink() { + @Override + public void setControl(SSHDialog.Control control) {} + @Override + public void setStreams(InputStream incoming, OutputStream outgoing) {} + @Override + public void start() {} + @Override + public void stop() {} + }, + String.format( + "mkdir -p '%1$s'", + new File(dest).getParent() + ), + null + ); + + if (_failException != null) { + throw _failException; + } _dialog.sendFile( _iso, dest -- To view, visit http://gerrit.ovirt.org/9524 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5519bd63383feba9b3bf971543b0d630c24bbca0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches