mirror of
https://github.com/minio/minio.git
synced 2025-01-24 05:03:16 -05:00
fix: the inspect script to use scheme per deployment (#18118)
This commit is contained in:
parent
6bc7d711b3
commit
3c470a6b8b
@ -2929,9 +2929,14 @@ func (a adminAPIHandlers) InspectDataHandler(w http.ResponseWriter, r *http.Requ
|
|||||||
sb.WriteString("\n")
|
sb.WriteString("\n")
|
||||||
logger.LogIf(ctx, embedFileInZip(inspectZipW, "inspect-input.txt", sb.Bytes(), 0o600))
|
logger.LogIf(ctx, embedFileInZip(inspectZipW, "inspect-input.txt", sb.Bytes(), 0o600))
|
||||||
|
|
||||||
|
scheme := "https"
|
||||||
|
if !globalIsTLS {
|
||||||
|
scheme = "http"
|
||||||
|
}
|
||||||
|
|
||||||
// save MinIO start script to inspect command
|
// save MinIO start script to inspect command
|
||||||
var scrb bytes.Buffer
|
var scrb bytes.Buffer
|
||||||
scrb.WriteString(`#!/usr/bin/env bash
|
fmt.Fprintf(&scrb, `#!/usr/bin/env bash
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
for file in $(ls -1); do
|
for file in $(ls -1); do
|
||||||
@ -2940,10 +2945,10 @@ function main() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Read content of inspect-input.txt
|
# Read content of inspect-input.txt
|
||||||
MINIO_OPTS=$(grep "Server command line args" <./inspect-input.txt | sed "s/Server command line args: //g" | sed -r "s#https:\/\/#\.\/#g")
|
MINIO_OPTS=$(grep "Server command line args" <./inspect-input.txt | sed "s/Server command line args: //g" | sed -r "s#%s:\/\/#\.\/#g")
|
||||||
|
|
||||||
# Start MinIO instance using the options
|
# Start MinIO instance using the options
|
||||||
START_CMD="CI=on _MINIO_AUTO_DISK_HEALING=off minio server ${MINIO_OPTS} &"
|
START_CMD="CI=on _MINIO_AUTO_DRIVE_HEALING=off minio server ${MINIO_OPTS} &"
|
||||||
echo
|
echo
|
||||||
echo "Starting MinIO instance: ${START_CMD}"
|
echo "Starting MinIO instance: ${START_CMD}"
|
||||||
echo
|
echo
|
||||||
@ -2955,8 +2960,7 @@ function main() {
|
|||||||
sleep 10
|
sleep 10
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"`,
|
main "$@"`, scheme)
|
||||||
)
|
|
||||||
logger.LogIf(ctx, embedFileInZip(inspectZipW, "start-minio.sh", scrb.Bytes(), 0o755))
|
logger.LogIf(ctx, embedFileInZip(inspectZipW, "start-minio.sh", scrb.Bytes(), 0o755))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,8 +496,12 @@ func (er erasureObjects) deleteIfDangling(ctx context.Context, bucket, object st
|
|||||||
m, ok := isObjectDangling(metaArr, errs, dataErrs)
|
m, ok := isObjectDangling(metaArr, errs, dataErrs)
|
||||||
if ok {
|
if ok {
|
||||||
tags := make(map[string]interface{}, 4)
|
tags := make(map[string]interface{}, 4)
|
||||||
|
tags["size"] = m.Size
|
||||||
tags["set"] = er.setIndex
|
tags["set"] = er.setIndex
|
||||||
tags["pool"] = er.poolIndex
|
tags["pool"] = er.poolIndex
|
||||||
|
tags["merrs"] = errors.Join(errs...)
|
||||||
|
tags["derrs"] = errors.Join(dataErrs...)
|
||||||
|
tags["mtime"] = m.ModTime.Format(http.TimeFormat)
|
||||||
tags["parity"] = m.Erasure.ParityBlocks
|
tags["parity"] = m.Erasure.ParityBlocks
|
||||||
if cok {
|
if cok {
|
||||||
tags["caller"] = fmt.Sprintf("%s:%d", file, line)
|
tags["caller"] = fmt.Sprintf("%s:%d", file, line)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user