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

[Availability Zone] VM Placement in a Zone integration #275

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f713194
added availability zone proto
mkatturu Jul 2, 2024
f10fdb7
updated pb.go
mkatturu Jul 2, 2024
49851d6
VM Placement with Zone - Part 1
bgriddaluru Jul 12, 2024
f4fdaa0
Rename zones to availability zones. Add strict affinity flag
bgriddaluru Jul 17, 2024
207a766
added status and virtualMachine reference in av zone
mkatturu Jul 18, 2024
97f0383
added av zone reference in virtual machine proto
mkatturu Jul 18, 2024
fdfb8a1
Merge branch 'users/mkatturu/AvailabilityZonesChanges' of github.com:…
mkatturu Jul 18, 2024
bf22732
updated virtual machine reference number
mkatturu Jul 18, 2024
9d01a8d
updated avzone reference number
mkatturu Jul 18, 2024
28c4989
ran make generate
mkatturu Jul 18, 2024
8968777
updated vitualMachineRef object
mkatturu Jul 19, 2024
d976e70
updated avzonereference in vm
mkatturu Jul 19, 2024
2c35b47
updated avzonereference in vm
mkatturu Jul 19, 2024
9a689ca
added groupName property
mkatturu Jul 22, 2024
8ff814a
sync with main branch
mkatturu Jul 23, 2024
bf676cf
after make generate
mkatturu Jul 23, 2024
ff7d141
Add Zone status in VM
bgriddaluru Jul 23, 2024
3a45b25
Move placement status under common status
bgriddaluru Jul 25, 2024
726c02b
Fix naming after integration
bgriddaluru Jul 25, 2024
1c19207
removed some properties
mkatturu Jul 25, 2024
61f4d15
moved availability zone to cloud
mkatturu Jul 25, 2024
580db54
moved the files to cloud
mkatturu Jul 25, 2024
919ecc8
added av zone update operation enum
mkatturu Jul 25, 2024
589ddf2
Merge remote-tracking branch 'manish-moc/users/mkatturu/AvailabilityZ…
bgriddaluru Jul 26, 2024
35fde8d
adding roles for avzones
mkatturu Jul 31, 2024
14d4136
fixed indentation
mkatturu Jul 31, 2024
ddce859
Merge remote-tracking branch 'manishi-moc/users/mkatturu/Availability…
bgriddaluru Aug 2, 2024
7b52d8e
Merge branch 'main' into users/bgriddaluru/vm_placement_with_zones_in…
bgriddaluru Sep 23, 2024
ab99fc8
merget with main - 2
bgriddaluru Sep 23, 2024
5dfa4e6
Move zone config message to common. Rename avzone to zone
bgriddaluru Sep 23, 2024
0adb31c
fix minor typos
bgriddaluru Sep 23, 2024
53e0307
fix minor typos
bgriddaluru Sep 23, 2024
a35b1df
Rename strictAffinity to strictPlacement
bgriddaluru Sep 25, 2024
9c18bf2
define zone message for node agent's VM spec
bgriddaluru Sep 25, 2024
95c309d
Add comments for messages
bgriddaluru Oct 1, 2024
132887c
Hide placement status if not set
bgriddaluru Oct 1, 2024
8b5d4bc
Merge branch 'main' into users/bgriddaluru/vm_placement_with_zones_in…
bgriddaluru Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ require (
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect
google.golang.org/protobuf v1.34.2 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/protobuf v1.35.1 // indirect
)

replace (
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -52,8 +52,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
Expand All @@ -62,12 +62,12 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
Expand Down
20 changes: 20 additions & 0 deletions pkg/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func InitStatus() *common.Status {
Version: GenerateVersion(),
DownloadStatus: &common.DownloadStatus{},
ValidationStatus: &common.ValidationStatus{},
PlacementStatus: &common.PlacementStatus{},
}
}

Expand Down Expand Up @@ -96,6 +97,16 @@ func GetValidationStatus(s *common.Status) []*common.ValidationState {
return s.GetValidationStatus().GetValidationState()
}

func SetPlacementStatus(s *common.Status, placementState *common.PlacementStatus) {
s.PlacementStatus = new(common.PlacementStatus)
s.PlacementStatus.Status = placementState.GetStatus()
s.PlacementStatus.Message = placementState.GetMessage()
}

func GetPlacementStatus(s *common.Status) common.PlacementStatusType {
return s.GetPlacementStatus().GetStatus()
}

// GetStatuses - converts status to map
func GetStatuses(status *common.Status) map[string]*string {
statuses := map[string]*string{}
Expand All @@ -113,6 +124,10 @@ func GetStatuses(status *common.Status) map[string]*string {
statuses["Version"] = &version
dstate := status.GetDownloadStatus().String()
statuses["DownloadStatus"] = &dstate
placementStatus := status.GetPlacementStatus().String()
if placementStatus != "" {
statuses["PlacementStatus"] = &placementStatus
}

return statuses
}
Expand Down Expand Up @@ -140,6 +155,11 @@ func GetFromStatuses(statuses map[string]*string) (status *common.Status) {
proto.UnmarshalText(*val, ps)
status.DownloadStatus = ps
}
if val, ok := statuses["PlacementStatus"]; ok {
ps := new(common.PlacementStatus)
proto.UnmarshalText(*val, ps)
status.PlacementStatus = ps
}

return
}
Expand Down
Loading
Loading