Skip to content

Commit

Permalink
set keystone url
Browse files Browse the repository at this point in the history
  • Loading branch information
wanyaoqi committed May 7, 2020
1 parent 8b50fd3 commit 2bd2d63
Show file tree
Hide file tree
Showing 37 changed files with 681 additions and 126 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ require (
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a // indirect
yunion.io/x/jsonutils v0.0.0-20200415132054-2bf8a5e94501
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
yunion.io/x/onecloud v0.0.0-20200422115051-5d4f7eabeeb0
yunion.io/x/onecloud v0.0.0-20200507033831-618e721114d9
yunion.io/x/pkg v0.0.0-20200416145704-22c189971435
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
yunion.io/x/structarg v0.0.0-20200423163001-168d0687be7e
)

replace (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -987,8 +987,8 @@ yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d h1:59zrDL7Ft+hDukguJRmLr/Gdu/
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3 h1:5Wc5hkB8PtMudmHuzCyok960RuOa9I55imIGrigSdjs=
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/onecloud v0.0.0-20200422115051-5d4f7eabeeb0 h1:5vPPcVpOydYcg6kCQbTAZbNrAlN4Cg5mIBivMeiNe7g=
yunion.io/x/onecloud v0.0.0-20200422115051-5d4f7eabeeb0/go.mod h1:l9w6FuC/yjgZTv85yJ3LoZ3KzQzaP81WjYo2VV6I7mM=
yunion.io/x/onecloud v0.0.0-20200507033831-618e721114d9 h1:FeAIYO9fkpc27QFF2vvvtnwbpKIV/zcB7zCGGijlQB4=
yunion.io/x/onecloud v0.0.0-20200507033831-618e721114d9/go.mod h1:LJlgqpCIePEuK3XaJpxw5vGoY9HkfvKepzF/M7T5rOg=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070 h1:rKnYgtvMHKmzPEUTkyNjyKOG7wzjpUvI7fcZwLNGQXw=
Expand All @@ -999,5 +999,5 @@ yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57 h1:KtQAuLJ00RSUVqkiRmJ1DiDABiw0U3xxXnzD3lGavaY=
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3 h1:bfC8EhXYvyGYldRWlzxiCM39Zfj3s3+zham9mW2h2LE=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
yunion.io/x/structarg v0.0.0-20200423163001-168d0687be7e h1:pctCe/EPel3F1B83pJ2q9b34Umd1NdbLW1Yd+Lzur2s=
yunion.io/x/structarg v0.0.0-20200423163001-168d0687be7e/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
9 changes: 5 additions & 4 deletions pkg/controller/onecloud_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func (w *OnecloudControl) RunWithSession(oc *v1alpha1.OnecloudCluster, f func(s
} else {
s = auth.GetAdminSession(context.Background(), oc.Spec.Region, "")
}
s.SetServiceUrl("identity", GetAuthURL(oc))
if err := f(s); err != nil {
auth.Init(config.ToAuthInfo(), false, true, "", "")
newSession := auth.GetAdminSession(context.Background(), oc.Spec.Region, "")
Expand Down Expand Up @@ -402,6 +403,10 @@ func (c keystoneComponent) SystemInit(oc *v1alpha1.OnecloudCluster) error {
region = oc.Status.RegionServer.RegionId
}
if err := c.RunWithSession(func(s *mcclient.ClientSession) error {
if err := c.doRegisterIdentity(s, region, oc.Spec.LoadBalancerEndpoint, KeystoneComponentName(oc.GetName()),
constants.KeystoneAdminPort, constants.KeystonePublicPort, true); err != nil {
return errors.Wrap(err, "register identity endpoint")
}
if err := doPolicyRoleInit(s); err != nil {
return errors.Wrap(err, "policy role init")
}
Expand All @@ -411,10 +416,6 @@ func (c keystoneComponent) SystemInit(oc *v1alpha1.OnecloudCluster) error {
regionId, _ := res.GetString("id")
oc.Status.RegionServer.RegionId = regionId
}
if err := c.doRegisterIdentity(s, region, oc.Spec.LoadBalancerEndpoint, KeystoneComponentName(oc.GetName()),
constants.KeystoneAdminPort, constants.KeystonePublicPort, true); err != nil {
return errors.Wrap(err, "register identity endpoint")
}
return nil
}); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ yunion.io/x/jsonutils
# yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
yunion.io/x/log
yunion.io/x/log/hooks
# yunion.io/x/onecloud v0.0.0-20200422115051-5d4f7eabeeb0
# yunion.io/x/onecloud v0.0.0-20200507033831-618e721114d9
yunion.io/x/onecloud/pkg/ansibleserver/options
yunion.io/x/onecloud/pkg/apis
yunion.io/x/onecloud/pkg/apis/ansible
Expand Down Expand Up @@ -640,5 +640,5 @@ yunion.io/x/pkg/utils
yunion.io/x/s3cli
# yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57
yunion.io/x/sqlchemy
# yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
# yunion.io/x/structarg v0.0.0-20200423163001-168d0687be7e
yunion.io/x/structarg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/yunion.io/x/onecloud/pkg/apis/compute/disk_const.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 25 additions & 4 deletions vendor/yunion.io/x/onecloud/pkg/apis/compute/guests.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions vendor/yunion.io/x/onecloud/pkg/apis/compute/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions vendor/yunion.io/x/onecloud/pkg/apis/compute/host_const.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion vendor/yunion.io/x/onecloud/pkg/apis/compute/loadbalancer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions vendor/yunion.io/x/onecloud/pkg/apis/compute/scaling_const.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions vendor/yunion.io/x/onecloud/pkg/apis/compute/vpcs_ovn.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2bd2d63

Please sign in to comment.