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

pkg/daemon: check channel closing #373

Merged
merged 1 commit into from
Feb 4, 2019

Conversation

runcom
Copy link
Member

@runcom runcom commented Feb 3, 2019

Fix #372, after this patch, no ssh/accessed annotation is applied on a machine config addition.

On reboot, the SessionNew subscribed channel gets closed
causing the node ssh/accessed annotation to be added.
This patch fixes that by checking if the channel is indeed
closing before going ahead and add the annotation.

Haven't added an e2e cause watching for something not to happen is gonna be the best flake ever, I'll defer to add proper testing around ssh/accessed being added on real login in a follow up.

Signed-off-by: Antonio Murdaca runcom@linux.com

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 3, 2019
@runcom runcom force-pushed the fix-ssh-accessed branch 2 times, most recently from 5e5156a to 9ca6f9d Compare February 3, 2019 15:46
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 3, 2019
@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 3, 2019
@runcom
Copy link
Member Author

runcom commented Feb 3, 2019

/test unit

@runcom runcom changed the title pkg/daemon: ignore nil signals pkg/daemon: check channel closing Feb 3, 2019
@runcom
Copy link
Member Author

runcom commented Feb 3, 2019

/test e2e-aws

@runcom
Copy link
Member Author

runcom commented Feb 3, 2019

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 3, 2019
@cgwalters
Copy link
Member

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 4, 2019
@yuqi-zhang
Copy link
Contributor

/lgtm
Good catch!

pkg/daemon/daemon.go Outdated Show resolved Hide resolved
On reboot, the SessionNew subscribed channel gets closed
causing the node ssh/accessed annotation to be added.
This patch fixes that by checking if the channel is indeed
closing before going ahead and add the annotation.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2019
@jlebon
Copy link
Member

jlebon commented Feb 4, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashcrow, cgwalters, jlebon, runcom, yuqi-zhang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@runcom
Copy link
Member Author

runcom commented Feb 4, 2019

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@runcom
Copy link
Member Author

runcom commented Feb 4, 2019

/retest

@openshift-merge-robot openshift-merge-robot merged commit c5f479e into openshift:master Feb 4, 2019
@runcom runcom deleted the fix-ssh-accessed branch February 4, 2019 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ssh: accessed annotation when creating a new MC
8 participants