Skip to content

Stopping syncd process via syncd_request_shutdown --cold not working properly #3041

Closed
@mfriyas

Description

@mfriyas

While executing restart_syncd.yml , the script was trying to execute the below command and expecting the process to be killed in output. But the command is fail to kill the syncd process.

utdown --cold264f-03:/home/admin# docker exec -i syncd /usr/bin/syncd_request_shu
requested COLD shutdown

root@sonic-z9264f-03:/home/admin# pgrep "<syncd>" -a

8396 /bin/bash /usr/local/bin/syncd.sh wait >>>>>>>>>>>>>>
8400 /bin/bash /usr/bin/syncd.sh wait

From script expectations

  • name: Stop syncd process
    shell: docker exec -i syncd /usr/bin/syncd_request_shutdown --cold

  • name: Wait 10 seconds for syncd to quit
    pause:
    seconds: 10

  • name: Look for syncd process
    shell: pgrep "<syncd>" -a
    register: syncd_out
    ignore_errors: yes

  • debug: msg="{{ syncd_out.stdout_lines }}"

  • fail: msg="Syncd is still running?"
    when:

    • ({{ syncd_out.stdout_lines | length }} > 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions