nuagenetworks / nuage-metroae

Nuage Networks Metro Automation Engine
http://devops.nuagenetworks.net
Apache License 2.0
44 stars 17 forks source link

VSC patch upgrade #1359

Closed sjabasti closed 4 years ago

sjabasti commented 4 years ago

Hi,

So i am trying to upgrade from 5.4.1.u6 to 5.4.1.u8
using the below commands: (using an openstack deployment)

bash metroae upgrade_vsds 5.4.1.u8 -v && bash metroae upgrade_vscs_before_vrs 5.4.1.u8 -v

This results in the following assertion:

    "PLAY RECAP *********************************************************************",  
    "localhost                  : ok=11   changed=0    unreachable=0    failed=0   ",  
    "",  
    "Using /opt/nuage-metro/ansible.cfg as config file",  
    "/opt/nuage-metro/src/inventory/hosts did not meet host_list requirements, check plugin documentation if this is unexpected",  
    "/opt/nuage-metro/src/inventory/hosts did not meet script requirements, check plugin documentation if this is unexpected",  
    "",  
    "PLAY [localhost] ***************************************************************",  
    "",  
    "TASK [assert] ******************************************************************",  
    "fatal: [localhost]: FAILED! => ",  
    "  assertion: not vsd_inplace_upgrade | default(false)",  
    "  evaluated_to: false",  
    "  msg: Inplace U-release upgrade is only supported for VSD using upgrade_vsds. Quitting.",  
    "",  
    "NO MORE HOSTS LEFT *************************************************************",  
    "",  
    "PLAY RECAP *********************************************************************",  
    "localhost                  : ok=0    changed=0    unreachable=0    failed=1   " 

So is it normal that we cannot use metro to perform a VSC patch upgrade where it only should replace the tim file?

Kind Regards Steven Bastiaens

ghost commented 4 years ago

@sjabasti Hey, Steven! This is a bug in MetroAE. We failed to consider the case where the VSC might be patched along with the VSD. It will certainly work, but we put that assertion in there that is stopping it from making progress. That assertion should be removed.

You have two choices for a work-around:

  1. Edit the MetroAE playbook to remove the assertion
  2. Use a second deployment for the VSC step, one in which you trick Metro into thinking you are upgrading from something else to 5.4.1.

For the edit option, you would need to remove these lines from src/playbooks/with_build/upgrade_vscs_before_vrs and upgrade_vscs_after_vrs:

For the second deployment option, you would do something like this in upgrade.yml:

upgrade_from_version: "5.3.2" upgrade_to_version: "5.4.1"

Metro will then to a .tim file replacement on the VSC. It just so happens that the code under the covers only uses those two versions to determine if it's a patch upgrade or not. It won't mess anything up to use "5.3.2" for the first and to leave off the "u" on the second.

ghost commented 4 years ago

Created METROAE-1176 to fix this.

ghost commented 4 years ago

Fixed.