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

bugfix: change volume metadata struct #1271

Merged
merged 1 commit into from
May 10, 2018

Conversation

rudyfly
Copy link
Collaborator

@rudyfly rudyfly commented May 4, 2018

Ⅰ. Describe what this PR did

change volume metadata struct for remote storage manager.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Signed-off-by: Rudy Zhang rudyflyzhang@gmail.com

@@ -83,10 +83,12 @@ type VolumeConfig struct {

// VolumeSpec represents volume spec.
type VolumeSpec struct {
ClusterAPI string `json:"clusterapi"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Quite confused on the naming of this field. ClusterAPI is some kind of network address?
If that, how about adding ClusterAPIAddress ?

@@ -6,10 +6,10 @@ import (

// Config represents volume config struct.
type Config struct {
ControlAddress string
Copy link
Collaborator

Choose a reason for hiding this comment

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

ControlServerAddress or ControlMasterAddress or MasterAddress?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it means control server address in csi. I change it to ControlServerAddress

@@ -6,10 +6,10 @@ import (

// Config represents volume config struct.
type Config struct {
ControlAddress string
Timeout time.Duration // operation timeout.
RemoveVolume bool
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am wondering if we could add some annotations for this field RemoveVolume ?

I wish that when code readers reader the struct itself, he could catch the exact meaning of it clearly, rather than trying hard to guess its meaning.

If we make it, I think the lifetime of the code would be much longer to be alive.

@rudyfly rudyfly force-pushed the volume-remote branch 2 times, most recently from 31b43c7 to 696adbd Compare May 7, 2018 06:34
@codecov-io
Copy link

codecov-io commented May 7, 2018

Codecov Report

Merging #1271 into master will decrease coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1271     +/-   ##
=========================================
- Coverage    15.4%   15.21%   -0.2%     
=========================================
  Files         174      172      -2     
  Lines       11026    10734    -292     
=========================================
- Hits         1699     1633     -66     
+ Misses       9208     8980    -228     
- Partials      119      121      +2
Impacted Files Coverage Δ
daemon/mgr/image_utils.go 0% <0%> (-40%) ⬇️
pkg/reference/def.go 33.33% <0%> (-11.12%) ⬇️
pkg/meta/boltdb.go 60.56% <0%> (-5.71%) ⬇️
daemon/mgr/cri_utils.go 28.85% <0%> (-0.46%) ⬇️
cli/upgrade.go 0% <0%> (ø) ⬆️
daemon/mgr/cri.go 0% <0%> (ø) ⬆️
daemon/config/config.go 7.89% <0%> (ø) ⬆️
daemon/mgr/system.go 0% <0%> (ø) ⬆️
ctrd/image.go 0% <0%> (ø) ⬆️
ctrd/container.go 0% <0%> (ø) ⬆️
... and 11 more

PoolSpec map[string]PoolSpec `json:"poolspec"` // storage pool spec
Type string `json:"type"` // storage type
ID string `json:"id,omitempty"` // storage uid or unique name
API string `json:"api"` // gateway address
Copy link
Collaborator

Choose a reason for hiding this comment

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

If it means gateway address, could we just use GatewayAddress?
I felt that API is so ambiguous. 😢

Copy link
Collaborator

Choose a reason for hiding this comment

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

If this filed is only used in CSI master, and will not be used in pouch, then maybe we need to remove this. WDYT? @rudyfly

change volume metadata struct for remote storage manager.

Signed-off-by: Rudy Zhang <rudyflyzhang@gmail.com>
@allencloud
Copy link
Collaborator

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label May 10, 2018
@allencloud allencloud merged commit e477879 into AliyunContainerService:master May 10, 2018
@rudyfly rudyfly deleted the volume-remote branch August 7, 2018 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/storage kind/bug This is bug report for project LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants