File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
services/secondary-storage/server/src/org/apache/cloudstack/storage/template Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -795,6 +795,10 @@ private List<String> listVolumes(String rootdir) {
795795 script .add ("-r" , rootdir );
796796 ZfsPathParser zpp = new ZfsPathParser (rootdir );
797797 script .execute (zpp );
798+ if (script .getExitValue () != 0 ) {
799+ s_logger .error ("Error while executing script " + script .toString ());
800+ throw new CloudRuntimeException ("Error while executing script " + script .toString ());
801+ }
798802 result .addAll (zpp .getPaths ());
799803 s_logger .info ("found " + zpp .getPaths ().size () + " volumes" + zpp .getPaths ());
800804 return result ;
@@ -807,6 +811,10 @@ private List<String> listTemplates(String rootdir) {
807811 script .add ("-r" , rootdir );
808812 ZfsPathParser zpp = new ZfsPathParser (rootdir );
809813 script .execute (zpp );
814+ if (script .getExitValue () != 0 ) {
815+ s_logger .error ("Error while executing script " + script .toString ());
816+ throw new CloudRuntimeException ("Error while executing script " + script .toString ());
817+ }
810818 result .addAll (zpp .getPaths ());
811819 s_logger .info ("found " + zpp .getPaths ().size () + " templates" + zpp .getPaths ());
812820 return result ;
You can’t perform that action at this time.
0 commit comments