Check Commit Confirmation
The following scenario shows an example where it’s useful to require a confirmation after the commit.
Test Commit Confirmation Needed
Description
In this simple scenario, the system is configured with ssh enabled and a commit confirmation-needed. In order to verify the commit confirmation, imagine that the user deletes the ssh service by mistake, once the changes are committed, the system will require a confirmation, and after 10 seconds if no confirmation is received, the system’s configuration will be automatically rolled back.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.0.0.1/24 set service ssh set system cli configuration commit confirm-needed timeout 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Ping IP address 10.0.0.1
from DUT0
:
admin@DUT0$ ping 10.0.0.1 count 1 size 56 timeout 1Show output
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data. 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.034 ms --- 10.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.034/0.034/0.034/0.000 ms
Step 3: Init an SSH connection from DUT0
to IP address 10.0.0.1
with the user admin
:
admin@DUT0$ ssh admin@10.0.0.1 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/nullShow output
Warning: Permanently added '10.0.0.1' (ECDSA) to the list of known hosts. admin@10.0.0.1's password: Welcome to Teldat OSDx v4.2.4.2 This system includes free software. Contact Teldat for licenses information and source code. Last login: Thu Apr 10 17:05:45 2025 admin@osdx$
Step 4: Modify the following configuration lines in DUT0
:
delete service
Step 5: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v4.2.4.2 # Thu 10 Apr 2025 17:06:02 +00:00 # Warning: Configuration has not been saved set interfaces ethernet eth0 address 10.0.0.1/24 set system cli configuration commit confirm-needed timeout 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
The above command deletes the ssh service, so the DUT0 will refuse the connection.
Step 6: Init an SSH connection from DUT0
to IP address 10.0.0.1
with the user admin
:
admin@DUT0$ ssh admin@10.0.0.1 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/null
Note
The system will wait for 10 seconds for a confirmation, if no confirmation is received, the commit will be rolled back.
Step 7: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v4.2.4.2 # Thu 10 Apr 2025 17:06:37 +00:00 set interfaces ethernet eth0 address 10.0.0.1/24 set service ssh set system cli configuration commit confirm-needed timeout 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 8: Init an SSH connection from DUT0
to IP address 10.0.0.1
with the user admin
:
admin@DUT0$ ssh admin@10.0.0.1 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/nullShow output
Warning: Permanently added '10.0.0.1' (ECDSA) to the list of known hosts. admin@10.0.0.1's password: Welcome to Teldat OSDx v4.2.4.2 This system includes free software. Contact Teldat for licenses information and source code. Last login: Thu Apr 10 17:06:01 2025 from 10.0.0.1 admin@osdx$
Note
This time we will confirm the commit, so the changes will be applied and no rollback will be done.
Step 9: Modify the following configuration lines in DUT0
:
delete service
Step 10: Run command system cli configuration commit confirm
at DUT0
and expect this output:
Show output
Configuration confirm-needed stopped successfully!
Step 11: Init an SSH connection from DUT0
to IP address 10.0.0.1
with the user admin
:
admin@DUT0$ ssh admin@10.0.0.1 option StrictHostKeyChecking=no option UserKnownHostsFile=/dev/null