Skip to content

Image-installer: Fix duplication of image prefix#1

Closed
fastiuk wants to merge 1 commit intomasterfrom
fix-image-installer-prefix
Closed

Image-installer: Fix duplication of image prefix#1
fastiuk wants to merge 1 commit intomasterfrom
fix-image-installer-prefix

Conversation

@fastiuk
Copy link
Owner

@fastiuk fastiuk commented May 17, 2022

Why I did it

  • SONiC prefix shown twice when working branch contains "image-" in its name.

Screenshot 2022-05-18 at 14 08 12

How I did it

Fixed sonic-installer's one bootloader wrapper to show correct version.
Screenshot 2022-05-18 at 14 08 33

How to verify it

Build image (the branch is important):

cd sonic-buildimage
git checkout -b dev-image-test
make configure PLATFORM=mellanox && make target/sonic-mellanox.bin

Run image on the switch and execute:

sudo sonic-installer list

Previous command output (if the output of a command-line utility has changed)

Screenshot 2022-05-18 at 14 08 12

New command output (if the output of a command-line utility has changed)

Screenshot 2022-05-18 at 14 08 33

* SONiC prefix shown twice when working branch
contains "image-" in its name.

Signed-off-by: Yevhen Fastiuk <[email protected]>
@fastiuk fastiuk force-pushed the fix-image-installer-prefix branch from c6900f0 to 37ea151 Compare May 18, 2022 13:11
@fastiuk fastiuk closed this May 18, 2022
@fastiuk fastiuk reopened this May 18, 2022
@fastiuk fastiuk closed this May 18, 2022
fastiuk pushed a commit that referenced this pull request Dec 13, 2023
…aidump_by_route_size (sonic-net#2972)

* * [saidump]
•	Saidump for DNX-SAI sonic-net/sonic-buildimage#13561

Solution and modification:
To use the redis-db SAVE option to save the snapshot of DB each time and recover later, instead of looping through each entry in the table and saving it.

(1) Updated sonic-buildimage/build_debian.sh, to install Python library rdbtools into the host.
(2) Updated sonic-buildimage/src/sonic-sairedis/saidump/saidump.cpp, add a new option -r, which updates the rdbtools's output-JSON files' format.
(3) Add a new script file: files/scripts/saidump.sh, to do the below steps
  For each ASIC0, such as ASIC0,

  #1. Save the Redis data.
  sudo sonic-db-cli -n asic$1 SAVE > /dev/null

  #2. Move dump files to /var/run/redisX/
  docker exec database$1 sh -c "mv /var/lib/redis/dump.rdb /var/run/redis$1/"

  #3. Run rdb command to convert the dump files into JSON files
  sudo python /usr/local/bin/rdb --command json  /var/run/redis$1/dump.rdb | sudo tee /var/run/redis$1/dump.json > /dev/null

  #4. Run saidump -r to update the JSON files' format as same as the saidump before. Then we can get the saidump result in standard output.
  docker exec syncd$1 sh -c "saidump -r /var/run/redis$1/dump.json"

  #5. clear
  sudo rm -f /var/run/redis$1/dump.rdb
  sudo rm -f /var/run/redis$1/dump.json

(4) Update sonic-buildimage/src/sonic-utilities/scripts/generate_dump, replace saidump with saidump.sh
* * [saidump]
•	Saidump for DNX-SAI sonic-net/sonic-buildimage#13561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant