I have a task to migrate n7k vpc peer-link from 2x10G-based port-channel to 2x40G-based port-channel.
When i shutdown original peer-link, vPCs on the secondary switch go down.
Then I remove "vpc peer-link" from the vPC primary switch, all vPCs on the primary switch go down as well.
The datacenter becomes black-holed. As the last step I reassign peer-link to 40G based portchannel and wait during "delay restore" timeout for all vPCs to come up.
Is there any better way to conduct that migration?
Unfortunately no. The reason the secondary switch suspends it's vPC member links is because of vPC loop avoidance mechanisms. This is to be expected when communication is disrupted on the peer-link but the primary vPC switch is still alive. When you remove the peer-link command on the primary, the vPCs member links on the primary will also go down because they no-longer have the necessary configuration to function as a working vPC. They will remain down at that point until the vPC peer-link is restored.
To minimize the outage you could build the port-channel on the 40G links and insure its working properly. Then simply remove the peer-link command from the 10G port-channel and apply it to the 40G port-channel at the same time. There are some other things you could do as well to work around this, but either way you are looking at taking a momentary traffic hit during the migration.
A proper way of migrating peer-link has been found and tested: