Migrate iptrunk
A modification workflow that migrates an IP trunk to a different endpoint.
For a trunk that originally connected endpoints A and B, this workflow introduces a new endpoint C. The trunk is then configured to run from A to C. B is then no longer associated with this IP trunk.
In the input form, the operator selects a new router where this trunk should terminate on.
initial_input_form_generator(subscription_id)
Gather input from the operator on the new router that the IP trunk should connect to.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
netbox_reserve_interfaces(subscription, new_node, new_lag_interface, new_lag_member_interfaces)
Reserve new interfaces in Netbox, only when the new side's router is a Nokia router.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
calculate_old_side_data(subscription, replace_index)
Store subscription information of the old side in the state of the workflow for later use.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
check_ip_trunk_optical_levels_pre(subscription)
Check Optical levels on the trunk before migration.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
check_ip_trunk_optical_levels_post(subscription, new_node, new_lag_member_interfaces, replace_index)
Check Optical POST levels on the trunk.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
check_ip_trunk_lldp(subscription, new_node, new_lag_member_interfaces, replace_index)
Check LLDP on the new trunk endpoints.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
disable_old_config_dry(subscription, new_node, new_lag_interface, new_lag_member_interfaces, replace_index, process_id, tt_number)
Perform a dry run of disabling the old configuration on the routers.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
disable_old_config_real(subscription, new_node, new_lag_interface, new_lag_member_interfaces, replace_index, process_id, tt_number)
Disable old configuration on the routers.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
deploy_new_config_dry(subscription, new_node, new_lag_interface, new_lag_member_interfaces, replace_index, process_id, tt_number)
Perform a dry run of deploying configuration on the new router.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
deploy_new_config_real(subscription, new_node, new_lag_interface, new_lag_member_interfaces, replace_index, process_id, tt_number)
Deploy configuration on the new router.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
update_remaining_side_bfd_dry(subscription, new_node, replace_index, process_id, tt_number)
Perform a dry run of updating configuration on the remaining router.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
update_remaining_side_bfd_real(subscription, new_node, replace_index, process_id, tt_number)
Update configuration on the remaining router.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
check_ip_trunk_bfd(subscription, new_node, replace_index)
Check BFD session across the new trunk.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
confirm_continue_move_fiber()
Wait for confirmation from an operator that the physical fiber has been moved.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
check_ip_trunk_connectivity(subscription, replace_index)
Check successful connectivity across the new trunk.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
deploy_new_isis(subscription, new_node, new_lag_interface, new_lag_member_interfaces, replace_index, process_id, tt_number)
Deploy ISIS configuration.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
check_ip_trunk_isis(subscription, replace_index)
Run an Ansible playbook to confirm ISIS adjacency.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
confirm_continue_restore_isis()
Wait for an operator to confirm that the old ISIS metric should be restored.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
restore_isis_metric(subscription, process_id, tt_number, old_isis_metric)
Restore the ISIS metric to its original value.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
delete_old_config_dry(subscription, new_node, new_lag_interface, new_lag_member_interfaces, replace_index, process_id, tt_number)
Perform a dry run of deleting the old configuration.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
delete_old_config_real(subscription, new_node, new_lag_interface, new_lag_member_interfaces, replace_index, process_id, tt_number)
Delete old configuration from the routers.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
update_ipam(subscription, replace_index, new_node, new_lag_interface)
Update IPAM resources.
Move the DNS record pointing to the old side of the trunk, to the new side.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
update_subscription_model(subscription, replace_index, new_node, new_lag_interface, new_lag_member_interfaces)
Update the subscription model in the database.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
netbox_remove_old_interfaces(old_side_data)
Remove the old LAG interface from Netbox, only relevant if the old side is a Nokia router.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
netbox_allocate_new_interfaces(subscription, replace_index)
Allocate the new LAG interface in Netbox. Only relevant if the new router is a Nokia.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
create_new_sharepoint_checklist(subscription, tt_number, process_id)
Create a new checklist item in SharePoint for approving this migrated IP trunk.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
modify_connection_strategy_to_out_of_band(subscription, replace_index)
Modify the replacement side of the IP trunk to use the out-of-band connection strategy.
This is necessary when the router is connected to only one IP trunk.
Note:
The router
retrieved from subscription.iptrunk.iptrunk_sides[replace_index].iptrunk_side_node
will be replaced and is no longer part of this subscription. Because of this, it does not get updated
automatically. To ensure consistency, we need to manually update it by calling router.save()
.
Alternatively, we could run a separate asynchronous modify_connection_strategy
migration,
but we have opted for the manual update approach here.
Source code in gso/workflows/iptrunk/migrate_iptrunk.py
migrate_iptrunk()
Migrate an IP trunk.
- Reserve new interfaces in Netbox
- Set the ISIS metric of the current trunk to an arbitrarily high value to drain all traffic
- Disable - but do not delete - the old configuration on the routers, first as a dry run
- Deploy the new configuration on the routers, first as a dry run
- Wait for operator confirmation that the physical fiber has been moved before continuing
- Deploy a new ISIS interface between routers A and C
- Wait for operator confirmation that ISIS is behaving as expected
- Restore the old ISIS metric on the new trunk
- Delete the old configuration from the routers, first as a dry run
- Reflect the changes made in IPAM
- Update the subscription model in the database
- Update the reserved interfaces in Netbox