support bundle: Remove volume snapshot list
Snapshot list are now in the engine status.
@@ -197,8 +197,6 @@ func (m *VolumeManager) generateSupportBundleYAMLs(yamlsDir string, errLog io.Wr
m.generateSupportBundleYAMLsForKubernetes(kubernetesDir, errLog)
longhornDir := filepath.Join(yamlsDir, "longhorn")
m.generateSupportBundleYAMLsForLonghorn(longhornDir, errLog)
- volumeDir := filepath.Join(yamlsDir, "volumes")
- m.generateSupportBundleYamlsForVolumes(volumeDir, errLog)
}
func (m *VolumeManager) generateSupportBundleYAMLsForKubernetes(dir string, errLog io.Writer) {
@@ -263,24 +261,6 @@ func writeErrorToFile(path string, errorMessage error) error {
return nil
}
-func (m *VolumeManager) generateSupportBundleYamlsForVolumes(dir string, errLog io.Writer) {
- volumesMap, err := m.ds.ListVolumes()
- if err != nil {
- fmt.Fprintf(errLog, "Support Bundle: failed to get volumes: %v\n", err)
- return
- }
- for volumeName := range volumesMap {
- snapshotsMap, snapshotError := m.ListSnapshots(volumeName)
- if snapshotError != nil {
- if err = writeErrorToFile(filepath.Join(dir, volumeName, "generationError.log"), snapshotError); err != nil {
- fmt.Fprintf(errLog, "Support Bundle: failed to write error: %v\n", err)
- }
- continue
- }
- encodeToYAMLFile(snapshotsMap, filepath.Join(dir, volumeName, "snapshots.yaml"), errLog)
- }
-}
-
func getObjectMapAndEncodeToYAML(name string, getMapFunc GetObjectMapFunc, yamlsDir string, errLog io.Writer) {
objMap, err := getMapFunc()
if err != nil {
