How to reset OPCP
Find out how to reset OPCP, from uninstalling the control plane and resetting the storage to deploying a fresh installation
Objective
This procedure describes how to do a full redeployment of OPCP without reinstalling the host Operating system of the Controller server.
This is a destructive operation. You will lose all your data including OPCP configuration as well as all data stored on OPCP servers when performing a complete reset of OPCP.
Requirements
You need SSH access to the controller node and sudo permissions. To check, run:
You will need those permissions on all controller nodes.
You also need SSH access to the switches. To check, connect to them:
You will find your switch IPs in the OPCP hardware config. Run opcp-cli config edit --hardware and look under the netbox_devices for devices with the role tor or tor_ipmi. Get the value from primary_ipv4.
To get the passwords for the switches, use opcp-cli secrets passwords --edit and look for the keys network_devices_admin_arista_secret, network_devices_admin_cisco_secret and network_devices_enable_secret.
Instructions
The OPCP control plane runs on K3s, with Ceph as its storage backend.
Get Ceph information
The first step is to get the information about the Ceph cluster:
This will output something similar to this:
This lists every device running as a Ceph OSD. Keep this list: you will need it later to wipe the disks.
Stop K3s cluster
After that, stop K3s on every controller node:
Wipe Ceph cluster
The next step is to erase all Ceph data:
Then, on every controller node, wipe all signatures (partition table, filesystem, LVM, RAID, etc.) from the disks listed earlier:
You can now securely erase all data (crypto erase is faster and preferred):
Reset K3s
Reset the iptables rules, then uninstall K3s, to avoid switch partitioning after the reset:
Reset network equipment
To reset the network equipment, connect to the switches via SSH. There are two types of switches: IPMI and TOR.
Using SSH to access the switches means you have to have access to the passwords for the switches. Public key authentication is not configured.
Look in the Requirements section on how to get the passwords for the network equipment.
Reset IPMI switches (Cisco)
SSH into the IPMI switch and run the following commands:
Reset the TOR switches (Arista)
Reset the startup config on every TOR switch. Start with TOR-B: otherwise you will no longer be able to reach it.
Do not run rm -rf /mnt/flash/*! This will erase the firmware: the switch can no longer boot to the ZTP config, and you will then have to upload a firmware via a serial cable.
Redeploy controller
On the first controller node, run the following command:
Go further
Getting started with your OPCP
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.
Join our community of users.