Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exos_config:save_when when a stopped process is present #110

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

uedvt359
Copy link
Contributor

@uedvt359 uedvt359 commented Sep 2, 2020

SUMMARY

NOTE: This is distinct from Bug #109, which I filed earler!

When a stopped process exists on the Switch, the prompt for the save command changes. This trips up save_when, which does not recognize the prompt and it runs into a timeout.

commit message:

When a process is created, and then terminated but not deleted, the
save config prompt will change. This module expected the old prompt,
which never arrived, so the save will run into a timeout.

This is how the special prompt looks:

  • Slot-1 HOSTNAMEHERE.1 # save
    The configuration file primary.cfg already exists.
    Some process has been terminated/stopped. If you save the configuration
    then that process's configuration will be lost.
    Do you want to continue? (y/N)
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

exos_config

ADDITIONAL INFORMATION
---
- hosts: all
  connection: network_cli
  user: uedvt359
  vars: 
    ansible_network_os: exos
    
  tasks:
  - name: create a process and make sure it was started at least once
    exos_config: 
      commands:
      - create process testProcess python-module __future__ start on-demand vr VR-Mgmt
      - start process testProcess
      save_when: changed

  - name: stop the saved process
    exos_config: 
      commands:
      - terminate process testProcess forceful

  - name: this will fail, since the prompt is unexpected
    exos_config:
      save_when: always

Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need a changelog fragment.

@felixfontein
Copy link
Collaborator

Please also observe the failed sanity tests (https://app.shippable.com/github/ansible-collections/community.network/runs/543/1/tests).

@felixfontein
Copy link
Collaborator

CC @hlrichardson @rdvencioneck @LindsayHill @bigmstone @ujwalkomarla you are listed as authors/maintainers of this module. Please check this change.

When a process is created, and then terminated but not deleted, the
save config prompt will change. This module expected the old prompt,
which never arrived, so the save will run into a timeout.

This is how the special prompt looks:
> * Slot-1 HOSTNAMEHERE.1 # save
> The configuration file primary.cfg already exists.
> Some process has been terminated/stopped. If you save the configuration
> then that process's configuration will be lost.
> Do you want to continue? (y/N)
@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug community_review module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review stale_ci CI is older than 7 days, rerun before merging labels Nov 16, 2020
@ansibullbot ansibullbot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI and removed small_patch Hopefully easy to review stale_ci CI is older than 7 days, rerun before merging labels Nov 10, 2021
@dericcrago dericcrago merged commit ac1351a into ansible-collections:main Dec 7, 2021
@patchback
Copy link

patchback bot commented Dec 7, 2021

Backport to stable-1: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-1/ac1351a5f799f820cbd4f1bf3b42793b8ae97e2d/pr-110

Backported as #343

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link

patchback bot commented Dec 7, 2021

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/ac1351a5f799f820cbd4f1bf3b42793b8ae97e2d/pr-110

Backported as #345

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link

patchback bot commented Dec 7, 2021

Backport to stable-2: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2/ac1351a5f799f820cbd4f1bf3b42793b8ae97e2d/pr-110

Backported as #344

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Dec 7, 2021
When a process is created, and then terminated but not deleted, the
save config prompt will change. This module expected the old prompt,
which never arrived, so the save will run into a timeout.

This is how the special prompt looks:
> * Slot-1 HOSTNAMEHERE.1 # save
> The configuration file primary.cfg already exists.
> Some process has been terminated/stopped. If you save the configuration
> then that process's configuration will be lost.
> Do you want to continue? (y/N)

(cherry picked from commit ac1351a)
patchback bot pushed a commit that referenced this pull request Dec 7, 2021
When a process is created, and then terminated but not deleted, the
save config prompt will change. This module expected the old prompt,
which never arrived, so the save will run into a timeout.

This is how the special prompt looks:
> * Slot-1 HOSTNAMEHERE.1 # save
> The configuration file primary.cfg already exists.
> Some process has been terminated/stopped. If you save the configuration
> then that process's configuration will be lost.
> Do you want to continue? (y/N)

(cherry picked from commit ac1351a)
patchback bot pushed a commit that referenced this pull request Dec 7, 2021
When a process is created, and then terminated but not deleted, the
save config prompt will change. This module expected the old prompt,
which never arrived, so the save will run into a timeout.

This is how the special prompt looks:
> * Slot-1 HOSTNAMEHERE.1 # save
> The configuration file primary.cfg already exists.
> Some process has been terminated/stopped. If you save the configuration
> then that process's configuration will be lost.
> Do you want to continue? (y/N)

(cherry picked from commit ac1351a)
dericcrago pushed a commit that referenced this pull request Dec 7, 2021
)

When a process is created, and then terminated but not deleted, the
save config prompt will change. This module expected the old prompt,
which never arrived, so the save will run into a timeout.

This is how the special prompt looks:
> * Slot-1 HOSTNAMEHERE.1 # save
> The configuration file primary.cfg already exists.
> Some process has been terminated/stopped. If you save the configuration
> then that process's configuration will be lost.
> Do you want to continue? (y/N)

(cherry picked from commit ac1351a)

Co-authored-by: uedvt359 <[email protected]>
dericcrago pushed a commit that referenced this pull request Dec 7, 2021
)

When a process is created, and then terminated but not deleted, the
save config prompt will change. This module expected the old prompt,
which never arrived, so the save will run into a timeout.

This is how the special prompt looks:
> * Slot-1 HOSTNAMEHERE.1 # save
> The configuration file primary.cfg already exists.
> Some process has been terminated/stopped. If you save the configuration
> then that process's configuration will be lost.
> Do you want to continue? (y/N)

(cherry picked from commit ac1351a)

Co-authored-by: uedvt359 <[email protected]>
dericcrago pushed a commit that referenced this pull request Dec 7, 2021
)

When a process is created, and then terminated but not deleted, the
save config prompt will change. This module expected the old prompt,
which never arrived, so the save will run into a timeout.

This is how the special prompt looks:
> * Slot-1 HOSTNAMEHERE.1 # save
> The configuration file primary.cfg already exists.
> Some process has been terminated/stopped. If you save the configuration
> then that process's configuration will be lost.
> Do you want to continue? (y/N)

(cherry picked from commit ac1351a)

Co-authored-by: uedvt359 <[email protected]>
@dericcrago
Copy link
Contributor

thank you for your contribution @uedvt359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug This issue/PR relates to a bug community_review module module needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants