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/upgrade manual #207

Merged
merged 6 commits into from
Feb 5, 2025
Merged

Conversation

mdrahman-suse
Copy link
Contributor

Proposed Changes

Types of Changes

Testing

Checklist:

  1. If your PR changes anything on or related to Jenkins, run it pointing to your branch to make sure it's okay.

  2. Verify code lint; we should not have errors.

  3. Update the documentation if needed.

  4. Update makefile and docker run if adding new tests.

  5. Run your tests at least 4 times with all configurations needed and possible.

  6. If needed test with different os types.

Linked Issues

Further Comments

@mdrahman-suse mdrahman-suse force-pushed the fix/upgrade_manual branch 18 times, most recently from 18d0ebc to fe15f2f Compare January 17, 2025 00:30
@mdrahman-suse mdrahman-suse force-pushed the fix/upgrade_manual branch 8 times, most recently from f228b16 to e69db6a Compare January 29, 2025 21:21
@mdrahman-suse mdrahman-suse marked this pull request as ready for review January 29, 2025 21:22
@@ -17,6 +18,12 @@ func TestDaemonset(applyWorkload, deleteWorkload bool) {
workloadErr = shared.ManageWorkload("apply", "daemonset.yaml")
Expect(workloadErr).NotTo(HaveOccurred(), "Daemonset manifest not deployed")
}

getDeamonset := "kubectl get pods -n test-daemonset" +
" --field-selector=status.phase=Running --kubeconfig="
Copy link
Contributor

@VestigeJ VestigeJ Jan 31, 2025

Choose a reason for hiding this comment

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

is the kubeconfig passed into this command or not? This looks to not be passing it like elsewhere

" --kubeconfig=" + shared.KubeConfigFile)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is being passed on the next line

Copy link
Contributor

Choose a reason for hiding this comment

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

To add to Justin's comment, for better readability could we have this getDeamonset+shared.KubeConfigFile set like in rest of the commands?

output, err = ms.ManageService(ip, status)
if output != "" {
Expect(output).To(ContainSubstring("active "),
fmt.Sprintf("error checking status %s service for %s node ip: %s", product, nodeType, ip))
Copy link
Contributor

Choose a reason for hiding this comment

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

shared.LogLevel("error", "") // ?

output, err := ms.ManageService(ip, status)
if output != "" {
Expect(output).To(ContainSubstring("active "),
fmt.Sprintf("error starting %s service for %s node ip: %s", product, nodeType, ip))
Copy link
Contributor

Choose a reason for hiding this comment

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

shared.LogLevel("error", "") // ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added expect here so no need to log, will update the expect message

Expect(output).To(ContainSubstring("active "),
fmt.Sprintf("error starting %s service for %s node ip: %s", product, nodeType, ip))
}
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("error starting %s service on %s", product, ip))
Copy link
Contributor

Choose a reason for hiding this comment

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

shared.LogLevel("error", "") // ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mdrahman-suse mdrahman-suse force-pushed the fix/upgrade_manual branch 7 times, most recently from 1d57851 to 6d7322c Compare February 4, 2025 00:16
shared/manageservice.go Outdated Show resolved Hide resolved
@mdrahman-suse mdrahman-suse force-pushed the fix/upgrade_manual branch 4 times, most recently from 6c2773b to 43a94ff Compare February 4, 2025 15:39
pods, err := shared.GetPods(false)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(pods).NotTo(BeEmpty())

res, _ := shared.RunCommandHost(cmd + " --kubeconfig=" + shared.KubeConfigFile)
if res != "" {
shared.LogLevel("info", "Pods not Running or Pending: \n%s", res)
Copy link
Contributor

Choose a reason for hiding this comment

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

Waiting for the pod status to become "Running".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

}

return true
}, "600s", "10s").Should(BeTrue(), "failed to process pods status")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we consider rephrasing it to 'Pod is not in the desired state,' since it seems that its the pod's status rather than the processing of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@mdrahman-suse mdrahman-suse merged commit a1f958b into rancher:main Feb 5, 2025
1 check passed
@mdrahman-suse mdrahman-suse deleted the fix/upgrade_manual branch February 5, 2025 17:03
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.

4 participants