Skip to main content

VsanUpgradeSystem

Struct VsanUpgradeSystem 

Source
pub struct VsanUpgradeSystem { /* private fields */ }
Expand description

VSAN Upgrade System.

Used to perform and monitor VSAN on-disk format upgrades.

Implementations§

Source§

impl VsanUpgradeSystem

Source

pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self

Source

pub async fn perform_vsan_upgrade_task( &self, cluster: &ManagedObjectReference, perform_object_upgrade: Option<bool>, downgrade_format: Option<bool>, allow_reduced_redundancy: Option<bool>, exclude_hosts: Option<&[ManagedObjectReference]>, ) -> Result<ManagedObjectReference>

Start VSAN on-disk format upgrade process on a particular cluster.

In order to perform this on-disk format upgrade, the upgrade process will perform a rolling evacuation/remove/re-add operation to accomplish the upgrade. In other words, one disk group at a time, it will evacuate the data from the disk group, then remove the old format from the now empty disk group, then reformat the disk group with the new format. Once all disk groups have been upgraded, and if the performObjectUpgrade parameter is set, the VSAN object version is also upgraded. Before the object version is upgraded, it is possible to downgrade the cluster by passing the downgradeFormat parameter. Once objects are of the new object version however, downgrade (and thus rollback) are no longer possible. The new object version is required to allow objects to benefit from new VSAN features. This is a long running (hours to days) task. In addition to normal task progress reporting, use the queryUpgradeStatus() API which allows to retrieve in-depth status updates from the upgrade process. In there will be a detailed log of every operation the upgrade process has taken or issues it encountered. Some are simple log messages, others refer to operations like evacuating a disk group. For such log entries, the task object of the evacuation task is provided to allow “sub-task” tracking. Before starting, the upgrade process will perform a pre-flight check, and abort if any of the pre-conditions are not met. See

See also VsanUpgradeSystem.PerformVsanUpgradePreflightCheckfor details on the pre-conditions being checked for. The upgrade process performs additional “pre-flight checks” before proceeding to upgrade the next host. The upgrade process will be halted if any of those pre-flight checks fail. If the upgrade process has been halted due to a problem, or even due to a crash or other failure, it can be re-started at any point in time. The upgrade will resume where it left off and only do the parts that are still outstanding. If the upgrade process stopped after removing VSAN from a disk group, but before re-adding those disks to VSAN, the upgrade process can recover from that. The pre-flight check results indicate such a condition. The upgrade process will however only re-add those disks if the restoreBackup parameter is passed in as true. Privilege “Host.Config.Storage” on all hosts under specified cluster is required..

Required privileges: System.Read

§Parameters:
§cluster

The cluster to be upgraded

Refers instance of ClusterComputeResource.

§perform_object_upgrade

After all disk groups have been updated, also upgrade all objects. Once started, rollback of the on disk format is no longer possible. Object upgrade unlocks new VSAN features.

§downgrade_format

Perform a on-disk format downgrade instead of upgrade. Only possible if no upgraded objects exist.

§allow_reduced_redundancy

Removes the need for one disk group worth of free space, by allowing reduced redundancy during disk upgrade.

§exclude_hosts

Internal debug option meant for functional testing of VSAN upgrades. Skips upgrade on certain hosts and implies performObjectUpgrade being false. Should not be used by customers.

Refers instances of HostSystem.

§Returns:

Refers instance of Task.

§Errors:

Failure

Source

pub async fn perform_vsan_upgrade_preflight_check( &self, cluster: &ManagedObjectReference, downgrade_format: Option<bool>, ) -> Result<Box<dyn VsanUpgradeSystemPreflightCheckResultTrait>>

Perform an upgrade pre-flight check on a cluster.

Required privileges: System.Read

§Parameters:
§cluster

The cluster for which to perform the check.

Refers instance of ClusterComputeResource.

§downgrade_format

Intend to perform a on-disk format downgrade instead of upgrade. Adds additional checks.

§Returns:

Pre-flight check result.

§Errors:

Failure

Source

pub async fn query_vsan_upgrade_status( &self, cluster: &ManagedObjectReference, ) -> Result<Box<dyn VsanUpgradeSystemUpgradeStatusTrait>>

Retrieve the latest status of a running, or the previously completed, upgrade process.

Information about previous upgrade runs are not always, e.g. when VC gets restarted.

Required privileges: System.Read

§Parameters:
§cluster

The cluster for which to retrieve the upgrade status.

Refers instance of ClusterComputeResource.

§Returns:

Status

§Errors:

Failure

Trait Implementations§

Source§

impl Clone for VsanUpgradeSystem

Source§

fn clone(&self) -> VsanUpgradeSystem

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: 'static,

Source§

fn as_any_ref<'a>(&'a self) -> &'a (dyn Any + 'static)

Cast a reference to Any trait.

Source§

fn as_any_box(self: Box<T>) -> Box<dyn Any>

Cast to a boxed reference to Any trait.

Source§

fn type_id(&self) -> TypeId

Get the underlying type identifier.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<To, T> CastInto<To> for T
where To: CastFrom<T> + ?Sized, T: 'static + ?Sized,

Source§

fn into_ref<'a>(&'a self) -> Option<&'a To>

Casts a reference to a trait object. If the cast fails, std::option::Option::None is returned.
Source§

fn into_box(self: Box<T>) -> Result<Box<To>, Box<dyn Any>>

Casts a boxed trait object to another trait object. If the cast fails, the original boxed trait object is returned in std::result::Result::Err.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,