diff --git a/SDK_CHANGELOG.md b/SDK_CHANGELOG.md index 98974560a..91127a427 100644 --- a/SDK_CHANGELOG.md +++ b/SDK_CHANGELOG.md @@ -2,6 +2,10 @@ ## Releases +### v0.174.0 - (12/12/2023) + +* Fix spec handler and internal naming for fs format options + ### v0.173.0 - (11/13/2023) * Add DefragJob data structure diff --git a/api/api.go b/api/api.go index c6b169862..6531867ee 100644 --- a/api/api.go +++ b/api/api.go @@ -66,7 +66,7 @@ const ( SpecExportOptionsEmpty = "empty_export_options" SpecMountOptions = "mount_options" // spec key cannot change due to parity with existing PSO storageclasses - SpecFaCreateOptions = "createoptions" + SpecFsFormatOptions = "createoptions" SpecCSIMountOptions = "csi_mount_options" SpecSharedv4MountOptions = "sharedv4_mount_options" SpecProxyProtocolS3 = "s3" diff --git a/api/api.pb.go b/api/api.pb.go index e80fac95a..f7fa10c6b 100644 --- a/api/api.pb.go +++ b/api/api.pb.go @@ -3215,7 +3215,7 @@ const ( // SDK version major value of this specification SdkVersion_Major SdkVersion_Version = 0 // SDK version minor value of this specification - SdkVersion_Minor SdkVersion_Version = 173 + SdkVersion_Minor SdkVersion_Version = 174 // SDK version patch value of this specification SdkVersion_Patch SdkVersion_Version = 0 ) @@ -3225,13 +3225,13 @@ var ( SdkVersion_Version_name = map[int32]string{ 0: "MUST_HAVE_ZERO_VALUE", // Duplicate value: 0: "Major", - 173: "Minor", + 174: "Minor", // Duplicate value: 0: "Patch", } SdkVersion_Version_value = map[string]int32{ "MUST_HAVE_ZERO_VALUE": 0, "Major": 0, - "Minor": 173, + "Minor": 174, "Patch": 0, } ) @@ -34938,7 +34938,7 @@ var file_api_api_proto_rawDesc = []byte{ 0x6e, 0x22, 0x49, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x48, 0x41, 0x56, 0x45, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x05, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x10, 0xad, 0x01, 0x12, 0x09, 0x0a, + 0x00, 0x12, 0x0a, 0x0a, 0x05, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x10, 0xae, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x63, 0x68, 0x10, 0x00, 0x1a, 0x02, 0x10, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, diff --git a/api/api.proto b/api/api.proto index e0c410df8..cf9b97d4f 100644 --- a/api/api.proto +++ b/api/api.proto @@ -5628,7 +5628,7 @@ message SdkVersion { // SDK version major value of this specification Major = 0; // SDK version minor value of this specification - Minor = 173; + Minor = 174; // SDK version patch value of this specification Patch = 0; } diff --git a/api/server/sdk/api/api.swagger.json b/api/server/sdk/api/api.swagger.json index e3ebb9ca4..96aa94635 100644 --- a/api/server/sdk/api/api.swagger.json +++ b/api/server/sdk/api/api.swagger.json @@ -6385,7 +6385,7 @@ }, "info": { "title": "OpenStorage SDK", - "version": "0.173.0" + "version": "0.174.0" }, "openapi": "3.0.0", "paths": { diff --git a/api/spec/spec_handler.go b/api/spec/spec_handler.go index b7bf5730d..a5a119668 100644 --- a/api/spec/spec_handler.go +++ b/api/spec/spec_handler.go @@ -161,6 +161,7 @@ var ( SpecIoThrottleRdBWRegex = regexp.MustCompile(api.SpecIoThrottleRdBW + "=([0-9]+),?") SpecIoThrottleWrBWRegex = regexp.MustCompile(api.SpecIoThrottleWrBW + "=([0-9]+),?") ReadaheadRegex = regexp.MustCompile(api.SpecReadahead + "=([A-Za-z]+),?") + SpecFsFormatOptionsRegex = regexp.MustCompile(api.SpecFsFormatOptions + "=([0-9A-Za-z_@:./#&+-=]+),?") ) type specHandler struct { @@ -201,10 +202,10 @@ func (d *specHandler) getVal(r *regexp.Regexp, str string) (bool, string) { func (d *specHandler) DefaultSpec() *api.VolumeSpec { return &api.VolumeSpec{ - Format: api.FSType_FS_TYPE_EXT4, - HaLevel: 1, - IoProfile: api.IoProfile_IO_PROFILE_AUTO, - Xattr: api.Xattr_COW_ON_DEMAND, + Format: api.FSType_FS_TYPE_EXT4, + HaLevel: 1, + IoProfile: api.IoProfile_IO_PROFILE_AUTO, + Xattr: api.Xattr_COW_ON_DEMAND, FpPreference: true, } } @@ -545,7 +546,7 @@ func (d *specHandler) UpdateSpecFromOpts(opts map[string]string, spec *api.Volum return nil, nil, nil, fmt.Errorf("invalid mount options format %v", v) } spec.MountOptions.Options = options - case api.SpecFaCreateOptions: + case api.SpecFsFormatOptions: spec.FaCreateOptions = v case api.SpecSharedv4MountOptions: if spec.Sharedv4MountOptions == nil { @@ -931,6 +932,9 @@ func (d *specHandler) SpecOptsFromString( if ok, ioThrottleBW := d.getVal(SpecIoThrottleWrBWRegex, str); ok { opts[api.SpecIoThrottleWrBW] = ioThrottleBW } + if ok, fsFormatOptions := d.getVal(SpecFsFormatOptionsRegex, str); ok { + opts[api.SpecFsFormatOptions] = fsFormatOptions + } return true, opts, name }