Skip to content

Conversation

@jaer-tsun
Copy link
Contributor

Reason for Change:

Slight refactoring of multi tenant CNI bits to support AKS-Swift on Windows

Requirements:

Notes:

@jaer-tsun jaer-tsun force-pushed the refactor-ipam-add branch 11 times, most recently from 71ec584 to 4ee008d Compare November 4, 2021 20:05
@jaer-tsun jaer-tsun force-pushed the refactor-ipam-add branch 3 times, most recently from 86c0396 to 890f7a5 Compare November 18, 2021 19:48
errInvalidArgs = errors.New("invalid arg(s)")
)

const (
Copy link
Member

Choose a reason for hiding this comment

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

remove this too

Copy link
Member

@tamilmani1989 tamilmani1989 left a comment

Choose a reason for hiding this comment

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

added a comment + we have to test this in both windows multitenancy and linux multitenancy before merge

@jaer-tsun jaer-tsun force-pushed the refactor-ipam-add branch 8 times, most recently from 4f52d2c to 4ddfae3 Compare November 30, 2021 20:22
@jaer-tsun jaer-tsun force-pushed the refactor-ipam-add branch 6 times, most recently from 73e4d6a to d68ace3 Compare March 10, 2022 16:41
if nwCfg.MultiTenancy {
cnsclient, er := cnscli.New(nwCfg.CNSUrl, defaultRequestTimeout)
if err != nil {
cnsClient, er := cnscli.New(nwCfg.CNSUrl, defaultRequestTimeout)
Copy link
Member

Choose a reason for hiding this comment

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

i didnt see you addressed this?

if err != nil {
log.Printf("GetMultiTenancyCNIResult failed with error %v", err)
return fmt.Errorf("GetMultiTenancyCNIResult failed:%w", err)
ipamAddResult.ipv4Result, ipamAddResult.ncResponse, ipamAddResult.hostSubnetPrefix, er = plugin.multitenancyClient.GetContainerNetworkConfiguration(
Copy link
Member

Choose a reason for hiding this comment

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

should not be returning result from GetContainerNetworkConfiguration as we discussed in call

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why are we changing the return here? (we use it throughout the rest of func and the call didn't explain why)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed and added conversion underneath via convertToCniResult


plugin.report.Context = "AzureCNIMultitenancy"
plugin.multitenancyClient.Init(cnsClient, AzureNetIOShim{})
plugin.ipamInvoker = NewCNSInvoker(k8sPodName, k8sNamespace, cnsClient, plugin.multitenancyClient)
Copy link
Member

@tamilmani1989 tamilmani1989 Mar 17, 2022

Choose a reason for hiding this comment

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

remove this line if not used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@jaer-tsun jaer-tsun force-pushed the refactor-ipam-add branch 4 times, most recently from 324f07f to 848a9ab Compare March 18, 2022 17:10
@jaer-tsun jaer-tsun requested a review from tamilmani1989 March 21, 2022 17:41
return IPAMAddResult{}, err
}

// first result is ipv4, second is ipv6, SWIFT doesn't currently support IPv6
Copy link
Member

Choose a reason for hiding this comment

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

update the comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this comment since it's already mentioned when describing func

log.Printf("Result from multitenancy %+v", result)
ipamAddResult.ipv4Result = convertToCniResult(ipamAddResult.ncResponse, args.IfName)

log.Printf("PrimaryInterfaceIdentifier :%v", ipamAddResult.hostSubnetPrefix.IP.String())
Copy link
Member

@tamilmani1989 tamilmani1989 Mar 22, 2022

Choose a reason for hiding this comment

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

can we print ipv4result as well? Also make sure we print network config received from cns

@jaer-tsun
Copy link
Contributor Author

pending windows e2e multitenancy tests

@jaer-tsun jaer-tsun merged commit 027938a into Azure:master Apr 1, 2022
@jaer-tsun jaer-tsun deleted the refactor-ipam-add branch April 1, 2022 23:40
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.

3 participants