Skip to content

proposal: report mode on dry-run by default #3

Closed

Description

@k0ste

Hi,

ceph-volume lvm batch command, when --yes is not defined will output brief --repot mode by default. This is very useful on scripting, for example:

#!/bin/bash

CHECK=$1

if [[ ${CHECK} != "--yes" ]]
  then
    echo -e "\n'--yes' is not provided, running in report mode\n"
    MODE="--report"
  else
    MODE="${CHECK}"
fi

ceph-volume lvm batch --no-auto --crush-device-class=nvme_ms ${MODE} \
  /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1 /dev/nvme4n1 \
  /dev/nvme5n1 /dev/nvme6n1 /dev/nvme7n1 /dev/nvme8n1 /dev/nvme9n1 \
  /dev/nvme10n1 /dev/nvme11n1 /dev/nvme12n1 /dev/nvme13n1 /dev/nvme14n1 \
  /dev/nvme15n1 /dev/nvme16n1 /dev/nvme17n1 /dev/nvme18n1 /dev/nvme19n1 \
  /dev/nvme20n1 /dev/nvme21n1 /dev/nvme22n1 /dev/nvme23n1

When Ceph operator want a report - it's just run the script, if brief_check_dry-run_report mode is okay, just add --yes to script will deploy OSD host

I think it will be useful for pgremapper too, instead y/n dialog without --yes

Thanks

Activity

  1. baergj commented on May 26, 2021

    @baergj
    Contributor

    That's a good idea. The current prompting system is vestigial from the earliest incarnations of the tool, when we had lower confidence in its correctness. I'll see if I can whip up a patch some point soon here.

  2. baergj commented on May 27, 2021

    @baergj
    Contributor

    Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions