-
Notifications
You must be signed in to change notification settings - Fork 505
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
Add OCI provider [7/7] #8541
Add OCI provider [7/7] #8541
Conversation
2794e54
to
1c23b6c
Compare
91b7e57
to
a6c7d93
Compare
55a3d72
to
cab8b62
Compare
cab8b62
to
cd15550
Compare
Does this depend on the Plug collection patch? Is there an order that we should review them? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some early comments as we get started reviewing this
provider/oci/environ_test.go
Outdated
expect.Times(times) | ||
} | ||
} | ||
// func (e *environSuite) setupListInstancesExpectations(instanceId string, state ociCore.InstanceLifecycleStateEnum, times int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented out code
// minVolumeSizeInGB represents the minimum size in GiB for | ||
// a single volume. For more information please see: | ||
// https://docs.oracle.com/cloud/latest/stcomputecs/STCSA/op-storage-volume--post.html#request | ||
minVolumeSizeInGB = 50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this is a different storage, but how does this compare with the ones we use for root disk? Can these values be shared, should they be caveated so that it is clear which one is used when?
minRootVolumeSize, etc?
And then its a little odd that one is in MB and one is in GB
|
||
func makeVolumeInfo(vol ociCore.Volume) storage.VolumeInfo { | ||
var size uint64 | ||
if vol.SizeInMBs != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The response can have either? or it always has both, or ? Is there a reason to prefer MB? (presumably just better fidelity?)
} | ||
response, nestedErr := v.storageAPI.DeleteVolume(context.Background(), req) | ||
if nestedErr != nil && !v.env.isNotFound(response.RawResponse) { | ||
logger.Warningf("failed to cleanup volume: %s", *details.Id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably also log the nestedErr content, since it is being suppressed.
string(ociCore.VolumeLifecycleStateTerminated), | ||
5*time.Minute) | ||
if nestedErr != nil && !errors.IsNotFound(nestedErr) { | ||
logger.Warningf("failed to cleanup volume: %s", *details.Id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There is a race condition here.
|
The Windows build has also been failing since 6/7 landed. Not sure exactly what is going on here.
|
The error message is probably not the real cause of the issue. Investigating. |
Resolved the Windows error in CI. It's a known Go issue, slated for 1.11 fix: |
cd15550
to
c08ac23
Compare
provider/oci/storage.go
Outdated
@@ -39,19 +78,46 @@ func (s *storageProvider) Releasable() bool { | |||
} | |||
|
|||
func (s *storageProvider) DefaultPools() []*storage.Config { | |||
return nil | |||
iscsiPool, _ := storage.NewConfig("iscsi", ociStorageProviderType, map[string]interface{}{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rename this so it doesn't conflict with the const name.
c98d856
to
4e624b5
Compare
return errs, nil | ||
} | ||
|
||
func (v *volumeSource) ReleaseVolumes(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know these are interface implementations, with comments on the interface itself, but it would be good to get comments on all these public methods - something to summarise the actions taken. In this case that releasing is disassociating the volumes from the model and controller by removing them from the volume tag collections.
4e624b5
to
e93f8af
Compare
!!build!! |
e93f8af
to
9fcceaf
Compare
!!build!! |
b0982e1
to
a07d063
Compare
|
a07d063
to
c5bcf1e
Compare
|
!!build!! |
Yeah, appears the order in which the API returns is not always the same. Replaced with a deepequals. Current failure seems something else. |
|
c5bcf1e
to
f968abd
Compare
f968abd
to
30716fd
Compare
|
Adds storage implementation.
Depends on: #8540