Skip to content

Commit

Permalink
mount/unmount secondary storage without sudo during system vm templat…
Browse files Browse the repository at this point in the history
…e registration
  • Loading branch information
sureshanaparti committed Feb 3, 2025
1 parent 2787e86 commit 4a16185
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

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

public static String getMountCommand(String nfsVersion, String device, String dir) {
String cmd = "sudo mount -t nfs";
String cmd = "mount -t nfs";
if (StringUtils.isNotBlank(nfsVersion)) {
cmd = String.format("%s -o vers=%s", cmd, nfsVersion);
}
Expand Down

0 comments on commit 4a16185

Please sign in to comment.