Page MenuHomePhabricator

Changes in /config/scripts/vyos-postconfig-bootup.script got lost during upgrade to 1.2.4
Needs testing, HighPublicBUG

Description

hi,

I execute a script on postconfig by adding it to /config/scripts/vyos-postconfig-bootup.script.
After upgrade from 1.2.3 -> 1.2.4 the changes got lost and the file looks orginal.

Before Upgrade:

#!/bin/sh
# This script is executed at boot time after VyOS configuration is fully applied.
# Any modifications required to work around unfixed bugs
# or use services not available through the VyOS CLI system can be placed here.
/config/scripts/rcs/rcs-mgnt-vlan.sh 2>/dev/null 1>/dev/null

After:

#!/bin/sh
# This script is executed at boot time after VyOS configuration is fully applied.
# Any modifications required to work around unfixed bugs
# or use services not available through the VyOS CLI system can be placed here.

Details

Difficulty level
Unknown (require assessment)
Version
1.2.4
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

rherold created this task.Jan 2 2020, 10:26 AM

I got this on two production systems on the next two I migrated I changed my workflow to:

add system image ****
configure
save
reboot

On this systems I did not have the problem.

syncer changed the task status from Open to Needs testing.Jan 6 2020, 12:26 AM
syncer assigned this task to Dmitry.
syncer triaged this task as High priority.
Dmitry added a comment.EditedJan 6 2020, 8:38 AM

Hi @rherold , I can't create this behaviour in LAB.
I have clear vyos-1.2.3 installed and do next steps:

  1. sudo nano /config/scripts/vyos-postconfig-bootup.script
#!/bin/sh
# This script is executed at boot time after VyOS configuration is fully applie$
# Any modifications required to work around unfixed bugs
# or use services not available through the VyOS CLI system can be placed here.
/config/scripts/rcs/rcs-mgnt-vlan.sh 2>/dev/null 1>/dev/null
  1. sudo mkdir /config/scripts/rcs/
  2. Create file sudo nano /config/scripts/rcs/rcs-mgnt-vlan.sh with following commands
#!/bin/bash

echo "test script" >> /tmp/migration.log
date >> /tmp/migration.log
  1. Add permission for execution sudo chmod +x /config/scripts/rcs/rcs-mgnt-vlan.sh
  2. Run reboot for confirm execution scripts and check output file in /tmp
vyos@test6:~$ cat /tmp/migration.log 
test script
Mon Jan  6 08:25:29 UTC 2020
  1. Update to 1.2.4 - add system image ...
  2. Reboot

All was migrated as expected and scripts runs. Can you explain how I can reach described behaviour?

pasik added a subscriber: pasik.Jan 6 2020, 12:26 PM