Skip to content

Commit 0a4e462

Browse files
mount/unmount secondary storage without sudo during system vm template registration
1 parent 6b298a1 commit 0a4e462

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
public class SystemVmTemplateRegistration {
8888
private static final Logger LOGGER = Logger.getLogger(SystemVmTemplateRegistration.class);
89-
private static final String UMOUNT_COMMAND = "sudo umount %s";
89+
private static final String UMOUNT_COMMAND = "umount %s";
9090
private static final String RELATIVE_TEMPLATE_PATH = "./engine/schema/dist/systemvm-templates/";
9191
private static final String ABSOLUTE_TEMPLATE_PATH = "/usr/share/cloudstack-management/templates/systemvm/";
9292
private static final String TEMPLATES_PATH = fetchTemplatesPath();
@@ -147,7 +147,7 @@ public SystemVmTemplateRegistration(String systemVmTemplateVersion) {
147147
}
148148

149149
public static String getMountCommand(String nfsVersion, String device, String dir) {
150-
String cmd = "sudo mount -t nfs";
150+
String cmd = "mount -t nfs";
151151
if (StringUtils.isNotBlank(nfsVersion)) {
152152
cmd = String.format("%s -o vers=%s", cmd, nfsVersion);
153153
}

0 commit comments

Comments
 (0)