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

Remove deprecated package #74

Conversation

ojmhetar
Copy link
Contributor

@ojmhetar ojmhetar commented Nov 5, 2018

No description provided.

Copy link
Contributor

@dlipovetsky dlipovetsky left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @ojmhetar!

cmd/nodereset.go Outdated
@@ -79,13 +79,13 @@ func cleanupNetworking() {
log.Infof("[nodeadm:reset] Removing flannel state files & resetting networking")
os.RemoveAll(constants.CNIConfigDir)
os.RemoveAll(constants.CNIStateDir)
deprecated.RunBestEffort("", "ip", "link", "del", "cni0")
deprecated.RunBestEffort("", "ip", "link", "del", "flannel.1")
exec.Command("ip", "link", "del", "cni0").Run()
Copy link
Contributor

Choose a reason for hiding this comment

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

Please explicitly ignore the error, i.e., _ := exec.Command(...)

cmd/nodereset.go Outdated
@@ -30,7 +30,7 @@ var nodeCmdReset = &cobra.Command{

func kubeadmReset() {
log.Infof("[nodeadm:reset] Invoking kubeadm reset")
deprecated.RunBestEffort(constants.BaseInstallDir, "kubeadm", "reset", "--ignore-preflight-errors=all")
exec.Command(filepath.Join(constants.BaseInstallDir, "kubeadm"), "reset", "--ignore-preflight-errors=all").Run()
Copy link
Contributor

Choose a reason for hiding this comment

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

Please explicitly ignore the error

cmd/nodereset.go Outdated
deprecated.RunBestEffort("", "ip", "link", "del", "cni0")
deprecated.RunBestEffort("", "ip", "link", "del", "flannel.1")
exec.Command("ip", "link", "del", "cni0").Run()
exec.Command("ip", "link", "del", "flannel.1").Run()
Copy link
Contributor

Choose a reason for hiding this comment

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

Explicitly ignore error

cmd/nodereset.go Outdated
}

func cleanupDockerImages() {
for _, image := range utils.GetImages() {
deprecated.RunBestEffort("", "docker", "rmi", "-f", image)
exec.Command("docker", "rmi", "-f", image).Run()
Copy link
Contributor

Choose a reason for hiding this comment

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

Explicitly ignore error

@dlipovetsky
Copy link
Contributor

nit: s/pacakge/package in commit message

@ojmhetar ojmhetar changed the title Remove deprecated pacakge Remove deprecated package Nov 5, 2018
@ojmhetar ojmhetar force-pushed the private/ojas/remove-deprecated branch from 63dc332 to 3beeaed Compare November 5, 2018 23:30
Copy link
Contributor

@puneetguptanitj puneetguptanitj left a comment

Choose a reason for hiding this comment

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

Thanks @ojmhetar !

@ojmhetar ojmhetar merged commit 82c38d3 into private/ojas/remove-flannel-manifest Nov 6, 2018
@ojmhetar ojmhetar deleted the private/ojas/remove-deprecated branch November 6, 2018 00:16
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.

5 participants