Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Bugfixes: Fixing AWS infra_configs change, and logging error in aws.go #498

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

neonihil
Copy link

@neonihil neonihil commented Jul 22, 2021

Overview

There were two errors which caused the deployment on AWS to fail.

  1. The original error is that AWS resources (IAM Policy documents and such) were moved from aws/infra_configs to distributions/aws/infra_configs in https://github.com/kubeflow/manifests/tree/master/distributions/aws/infra_configs

  2. There was an error handling bug in kfctl, which caused kfctl to panic and crash.

This PR fixes both.

infra_configs fix

This was fixed by simply changing the constant to point to distributions/aws/infra_configs.

Logging fix

kfctl was crashing after creating the aws_configroot directory.

INFO[0002] Creating AWS infrastructure configs in directory /home/dev/repos/03-kubeflow/rokt-kubeflow/tmp/_config/kubeflow/aws_config  filename="aws/aws.go:308"
panic: interface conversion: error is *os.PathError, not *apis.KfError

goroutine 1 [running]:
github.com/kubeflow/kfctl/v3/pkg/kfapp/aws.(*Aws).Generate(0xc00014aa00, 0x231639a, 0x3, 0x3, 0xc000850508)
	/Users/jiaxin/go/src/github.com/kubeflow/kfctl/pkg/kfapp/aws/aws.go:444 +0x2a6d
github.com/kubeflow/kfctl/v3/pkg/kfapp/coordinator.(*coordinator).Generate.func1(0xc0001cca00, 0x0)
	/Users/jiaxin/go/src/github.com/kubeflow/kfctl/pkg/kfapp/coordinator/coordinator.go:537 +0xe3
github.com/kubeflow/kfctl/v3/pkg/kfapp/coordinator.(*coordinator).Generate(0xc0004ee8e0, 0x231639a, 0x3, 0x0, 0x0)
	/Users/jiaxin/go/src/github.com/kubeflow/kfctl/pkg/kfapp/coordinator/coordinator.go:590 +0x241
github.com/kubeflow/kfctl/v3/pkg/kfapp/coordinator.NewLoadKfAppFromURI(0x7ffdfd2cf3da, 0x49, 0xc0006b5d9a, 0x5, 0x0, 0x0)
	/Users/jiaxin/go/src/github.com/kubeflow/kfctl/pkg/kfapp/coordinator/coordinator.go:236 +0x47b
github.com/kubeflow/kfctl/v3/cmd/kfctl/cmd.glob..func2(0x393bca0, 0xc000668c00, 0x0, 0x3, 0x0, 0x0)
	/Users/jiaxin/go/src/github.com/kubeflow/kfctl/cmd/kfctl/cmd/build.go:51 +0x1de
github.com/spf13/cobra.(*Command).execute(0x393bca0, 0xc000668bd0, 0x3, 0x3, 0x393bca0, 0xc000668bd0)
	/Users/jiaxin/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0x393d1a0, 0xc0003bbf20, 0xc00078ff48, 0x1c61b60)
	/Users/jiaxin/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/jiaxin/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
github.com/kubeflow/kfctl/v3/cmd/kfctl/cmd.Execute(0x2703ff0, 0x11)
	/Users/jiaxin/go/src/github.com/kubeflow/kfctl/cmd/kfctl/cmd/root.go:61 +0x56
main.main()
	/Users/jiaxin/go/src/github.com/kubeflow/kfctl/cmd/kfctl/main.go:36 +0x39
m

The error is caused by the line that tries to print the error. It is expecting an apis.KfError, but instead it got an os.PathError.

I have fixed this by converting os.PathError to apis.KfError.

Daniel Kovacs added 2 commits July 22, 2021 13:10
@google-cla
Copy link

google-cla bot commented Jul 22, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@aws-kf-ci-bot
Copy link

Hi @neonihil. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@neonihil neonihil changed the title Bugfixes: AWS infra_configs and logging bufixes in aws package Bugfixes: Fixing AWS infra_configs change, and logging error in aws.go Jul 22, 2021
@adrian555
Copy link
Member

May need reviews from @Jeffwan or @PatrickXYS , thanks.

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BrunoChauvet, neonihil
To complete the pull request process, please assign jeffwan after the PR has been reviewed.
You can assign the PR to them by writing /assign @jeffwan in a comment when ready.

The full list of commands accepted by this bot can be found 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

Copy link
Member

@Arhell Arhell left a comment

Choose a reason for hiding this comment

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

Please sign CLA
#498 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants