-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Shared Filesystem as a First Class Feature #9208
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
Merged
Merged
Changes from all commits
Commits
Show all changes
147 commits
Select commit
Hold shift + click to select a range
6233ebd
File share : db schema
abh1sar bbbbb69
File Share : FileShare interface with fsm and constants
abh1sar af3d873
File share : crud apis, vo and dao skeleton.
abh1sar dc916f8
File Share : ServiceImpl class and framework-plugin structure
abh1sar 948ee45
File Share : Skeleton code for SimulatorFileShareProvider and Storage…
abh1sar d6aac5c
File Share : Dao spring context, added created and removed to VO
abh1sar 5bff62e
File Share : minor changes to FileShareDao
abh1sar 43ccf1e
File Share : Added lifecycle class, file share provider map etc
abh1sar 96375f3
File Share : added emtpy constructor to FileShareVO
abh1sar 0f52310
File Share : Added schema, vo and dao for storagefsvm table plus othe…
abh1sar 3a692b9
File Share : Api, response and service layer changes for create, list…
abh1sar e21c457
Merge remote-tracking branch 'upstream/main' into fsp_synced
abh1sar a156214
File Share : minor fix to gen_toc
abh1sar 4bd8283
File Share : api, service layer implementations
abh1sar ebbc1e8
File Share : minor - import remove in StorageFsVMFileShareLifeCycle
abh1sar 6d85670
UI, fileshare response, update api
abh1sar f3fd82c
Merge remote-tracking branch 'upstream/main' into fsp
abh1sar 204aaa1
fix StorageFsVmFileShareLifeCycle impl
abh1sar fcb39c2
State and event changes
abh1sar 997d914
ui/locales for fileshare
abh1sar 8791690
Merge branch 'main' into filesharepoc
abh1sar 0c10548
event for initialize and deploy
abh1sar a99cafb
UI custom disk offering
abh1sar 1bd9219
Merge branch 'main' into filesharepoc
abh1sar bb00408
UI: Instance and Volume tab. offerings in details pane
abh1sar fc486d4
size in createFileShareCmd can be null if diskoffering is not custom
abh1sar f205961
New disk offering flag for fileshares
abh1sar 53c3a47
db change to support new disk offering flag for file share
abh1sar 7f02195
Remove VM type StorageFsVm and related VO/Dao. Remove Simulator provider
abh1sar df8268d
Fixed nics in fileshare response + some ui changes + new user vm type…
abh1sar ef0a9fb
Merge remote-tracking branch 'upstream/main' into fsp
abh1sar 87f8001
Added storage_fileshare_view table,vo,dao. updated fileshareresponse …
abh1sar 38aec51
Merge branch 'main' into filesharepoc
abh1sar 9ebf866
systemvm changes
abh1sar 50f9148
add storagefsvm type to cmdline args
abh1sar feedf98
fsvm cloud init
abh1sar f50c4f9
Createfileshare ui to get networks andoffering for specific account a…
abh1sar 24b33a1
Merge branch 'main' into filesharepoc
abh1sar 4c7a1c6
fix pre-commit failures
abh1sar 0ea68a7
remove simulator from pom.xml. provider and lifecycle
abh1sar be5defe
Disable attach.detach volume. Xfs install and resize
abh1sar 2c07fe8
remove size column in storage_fileshare and get it from the volume
abh1sar 7d156ff
get disk offering from volume. change diskoffering for file share
abh1sar 253e230
Don't show file share diskoffering by default
abh1sar fdaf3bb
Restart file share with cleanup + misc changes
abh1sar ee20973
attachVoltoVM for fileshare restart
abh1sar 92d07dc
minor change in deleteFileShare
abh1sar b434266
create default fsvm disk offering
abh1sar 336e016
filesystem and hypervisor specific fsvm init
abh1sar 78476d9
show volume stats in file share view
abh1sar 08b3fa0
Merge remote-tracking branch 'upstream/main' into fsp
abh1sar f72beb5
Added minimum cpu,ram limit to service offerings
abh1sar 97cdbc6
add serviceoffering to update fileshare
abh1sar 9f5bce3
fileshare start,stop, change offering apis
abh1sar 8544c34
UI for fileshare resize,start,stop,changeoffering
abh1sar 6efc1f6
Don't try to format the disk on restart with cleanup
abh1sar 91f9d02
file share instance tab improvement
abh1sar 29602d0
Expunge logic
abh1sar 8d13e17
Recover and Expunge api + ui
abh1sar c988752
fs format changes
abh1sar 5d2e2a6
Ui improvements for Fileshare tabs
abh1sar 4391eb5
minor ui fixes
abh1sar 15fc2eb
Project,domain,account basic handling
abh1sar d380e66
Remove file share specific disk offering
abh1sar 249e660
Project owned fileshare fixes
abh1sar c9726a0
uservm type in uservmresponse + add storagefsvm config to capability
abh1sar 72c7d18
remove file share resize api and ui
abh1sar f873149
fix in global setting to disable file share feature
abh1sar e892ff7
API checks and ui fix for changeSrviceoffering
abh1sar 0e4a74a
Added checks to service apis
abh1sar a2f5df6
UI improvements re groupaction and filter
abh1sar 41b34b3
disawllow vm operations on storagefsvm
abh1sar 62fd111
fix pre-commit failure
abh1sar 2d9210c
Merge remote-tracking branch 'upstream/main' into fsp
abh1sar 8c52ef8
Improvements for the service layer
abh1sar 04844d8
fix pre-commit failure
abh1sar 0e4990b
fix pre-commit failure
abh1sar 9f72120
Misc backend minor changes
abh1sar fa628cb
Minor misc ui improvements
abh1sar 5b0c829
Added ui/api support for chosing fs format
abh1sar 74ffafb
export share to all networks
abh1sar 2ce6663
Fixed storagefsvm naming
abh1sar a5c291e
Improvement to the Access tab
abh1sar a2f8333
Added dochelp to ui + minor changes
abh1sar a2bd0fd
Changes to storagefsvm.sh
abh1sar 94369c8
UT for service and lifecycle classes + minor fixes
abh1sar d947b41
Merge remote-tracking branch 'upstream/main' into fsp
abh1sar f76ea14
fix pre-commit failures
abh1sar 36a72d4
increase timeout for scan lock
abh1sar 2efbfb2
Fixed UT failures
abh1sar 506094a
Added fileShareJoinDao UT and minor fixes
abh1sar 563a7f4
Addressed 1st set of comments by Wei
abh1sar 03d2193
Merge remote-tracking branch 'upstream/main' into fsp
abh1sar a974741
fix precommit failure
abh1sar 99e6733
Addressed first set of comments from Abhishek
abh1sar 9ff34b8
passing hypervisor type to userdata
abh1sar bcc6927
Iterate through hypervisors until a vm deployment is successful
abh1sar 5101a7b
Merge remote-tracking branch 'upstream/main' into fs
abh1sar 06f5b25
merged try-catch block for create and start vm
abh1sar 9e41a2e
Integration test for file share
abh1sar 2cd8400
Added more unit tests
abh1sar f4dd8e3
Merge remote-tracking branch 'upstream/main' into fs
abh1sar 499bc74
Fixed ut failure due to GlobalLock
abh1sar 9c6351c
fixed pre-commit failure
abh1sar 2da161d
Fixed resize udev rules
abh1sar 806cd6a
Merge branch 'main' into filesharepoc
abh1sar eb0d5b9
dropdown for format and remove provider in create form
abh1sar 1c0aae9
Fix for zone being displayed twice in the create form
abh1sar c7c0de3
Expunge fileshares in Error state automatically
abh1sar 0aefdfd
Fix expunge and force select option not working with Group Destroy
abh1sar dd7bd92
Merge remote-tracking branch 'upstream/main' into fs
abh1sar 4b773b6
Added fileshare resize to integration test
abh1sar f45d7fc
Merge branch 'filesharepoc' of https://github.com/abh1sar/cloudstack …
abh1sar eeb17cd
Rename format to filesystem
abh1sar e121755
minor changes to createfileshare form
abh1sar 5443011
run dhclient for interfaces added before cloud-init + no_root-squash
abh1sar 5bfdc8b
Restart with cleanup and changeServiceOffering with preserve ip
abh1sar 0683400
Rename File Share to Shared FileSystem
abh1sar bf44f56
Don't allow duplicate shared fs name for the same account
abh1sar 065dbef
Merge remote-tracking branch 'upstream/main' into fs
abh1sar 5d1f417
remove sharedfsdaoimpletest and added eof line to init.sh
abh1sar 0c6a29a
Added domain path to shared fs view
abh1sar db168a5
changed export path to /export and shared network related checks
abh1sar 3804e8e
Fix SharefFSServiceImpleTest failure
abh1sar 12068dc
disallow duplicate shared fs name for account-domain
abh1sar c500b05
Merge remote-tracking branch 'upstream/main' into fs
abh1sar c78cd80
Filter shared filesystems by network
abh1sar 722ab10
fix addnictovm failure in smokes
abh1sar 379d8c5
resize udev trigger doesn't work if vm is stopped
abh1sar 74a036e
fix pre-commit failure
abh1sar 3a02beb
xfs_growfs should work on the mount point, not on the device
abh1sar a568a8d
Merge remote-tracking branch 'upstream/main' into fsp
abh1sar 45e0ffe
rename storagefsvm to sharedfsvm. ssh related changes in sharedfsvm.sh
abh1sar cab8504
Change storagefsvm -> sharedfsvm in init.sh
abh1sar 61a9db9
fix integration test failure for vmware and xen
abh1sar 9541620
Update systemvm/debian/opt/cloud/bin/setup/cloud-early-config
weizhouapache c11a523
Addressed comments by Wei
abh1sar 905ebf9
Fix integration test for xenserver
abh1sar 7c5cd19
Merge branch 'filesharepoc' of https://github.com/abh1sar/cloudstack …
abh1sar 7139be4
fix sharedfs create on shared project network
abh1sar 8f64d60
remove resetsshkeypair support for sharedfsvm
abh1sar a82b732
Merge remote-tracking branch 'upstream/main' into fs
abh1sar 5665cab
Run the resize filesystem script via add udev rule if resize is done …
abh1sar f8c26d2
Fix resize.service for ext4
abh1sar cf8f85f
systemvm optimization + minor changes in ui and test
abh1sar 1cf6c90
Merge remote-tracking branch 'upstream/main' into fs
abh1sar c5214ac
Merge remote-tracking branch 'upstream/main' into fs
abh1sar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
...rg/apache/cloudstack/api/command/user/storage/sharedfs/ChangeSharedFSDiskOfferingCmd.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
| package org.apache.cloudstack.api.command.user.storage.sharedfs; | ||
|
|
||
| import javax.inject.Inject; | ||
|
|
||
| import org.apache.cloudstack.acl.RoleType; | ||
| import org.apache.cloudstack.api.APICommand; | ||
| import org.apache.cloudstack.api.ApiConstants; | ||
| import org.apache.cloudstack.api.ApiErrorCode; | ||
| import org.apache.cloudstack.api.BaseAsyncCmd; | ||
| import org.apache.cloudstack.api.Parameter; | ||
| import org.apache.cloudstack.api.ResponseObject; | ||
| import org.apache.cloudstack.api.ServerApiException; | ||
| import org.apache.cloudstack.api.command.user.UserCmd; | ||
| import org.apache.cloudstack.api.response.DiskOfferingResponse; | ||
| import org.apache.cloudstack.api.response.SharedFSResponse; | ||
| import org.apache.cloudstack.context.CallContext; | ||
| import org.apache.cloudstack.storage.sharedfs.SharedFS; | ||
| import org.apache.cloudstack.storage.sharedfs.SharedFSService; | ||
|
|
||
| import com.cloud.event.EventTypes; | ||
| import com.cloud.exception.ResourceAllocationException; | ||
| import com.cloud.user.Account; | ||
|
|
||
| @APICommand(name = "changeSharedFileSystemDiskOffering", | ||
| responseObject= SharedFSResponse.class, | ||
| description = "Change Disk offering of a Shared FileSystem", | ||
| responseView = ResponseObject.ResponseView.Restricted, | ||
| entityType = SharedFS.class, | ||
| requestHasSensitiveInfo = false, | ||
| since = "4.20.0", | ||
| authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) | ||
| public class ChangeSharedFSDiskOfferingCmd extends BaseAsyncCmd implements UserCmd { | ||
|
|
||
| @Inject | ||
| SharedFSService sharedFSService; | ||
|
|
||
| ///////////////////////////////////////////////////// | ||
| //////////////// API parameters ///////////////////// | ||
| ///////////////////////////////////////////////////// | ||
|
|
||
| @Parameter(name = ApiConstants.ID, | ||
| type = CommandType.UUID, | ||
| required = true, | ||
| entityType = SharedFSResponse.class, | ||
| description = "the ID of the shared filesystem") | ||
| private Long id; | ||
|
|
||
| @Parameter(name = ApiConstants.DISK_OFFERING_ID, | ||
| type = CommandType.UUID, | ||
| entityType = DiskOfferingResponse.class, | ||
| description = "the disk offering to use for the underlying storage") | ||
| private Long diskOfferingId; | ||
|
|
||
| @Parameter(name = ApiConstants.SIZE, | ||
| type = CommandType.LONG, | ||
| description = "the size of the shared filesystem in GiB") | ||
| private Long size; | ||
|
|
||
| @Parameter(name = ApiConstants.MIN_IOPS, | ||
| type = CommandType.LONG, | ||
| description = "min iops") | ||
| private Long minIops; | ||
|
|
||
| @Parameter(name = ApiConstants.MAX_IOPS, | ||
| type = CommandType.LONG, | ||
| description = "max iops") | ||
| private Long maxIops; | ||
|
|
||
| ///////////////////////////////////////////////////// | ||
| /////////////////// Accessors /////////////////////// | ||
| ///////////////////////////////////////////////////// | ||
|
|
||
| public Long getId() { | ||
| return id; | ||
| } | ||
|
|
||
| public Long getSize() { | ||
| return size; | ||
| } | ||
|
|
||
| public Long getDiskOfferingId() { | ||
| return diskOfferingId; | ||
| } | ||
|
|
||
| public Long getMinIops() { | ||
| return minIops; | ||
| } | ||
|
|
||
| public Long getMaxIops() { | ||
| return maxIops; | ||
| } | ||
|
|
||
| ///////////////////////////////////////////////////// | ||
| /////////////// API Implementation/////////////////// | ||
| ///////////////////////////////////////////////////// | ||
|
|
||
| @Override | ||
| public String getEventType() { | ||
| return EventTypes.EVENT_SHAREDFS_CHANGE_DISK_OFFERING; | ||
| } | ||
|
|
||
| @Override | ||
| public String getEventDescription() { | ||
| return "Changing disk offering for the Shared FileSystem " + id; | ||
| } | ||
|
|
||
| @Override | ||
| public long getEntityOwnerId() { | ||
| return CallContext.current().getCallingAccount().getId(); | ||
| } | ||
|
|
||
| @Override | ||
| public void execute() throws ResourceAllocationException { | ||
| SharedFS sharedFS = sharedFSService.changeSharedFSDiskOffering(this); | ||
| if (sharedFS != null) { | ||
| ResponseObject.ResponseView respView = getResponseView(); | ||
| Account caller = CallContext.current().getCallingAccount(); | ||
| if (_accountService.isRootAdmin(caller.getId())) { | ||
| respView = ResponseObject.ResponseView.Full; | ||
| } | ||
| SharedFSResponse response = _responseGenerator.createSharedFSResponse(respView, sharedFS); | ||
| response.setObjectName(SharedFS.class.getSimpleName().toLowerCase()); | ||
| response.setResponseName(getCommandName()); | ||
| setResponseObject(response); | ||
| } else { | ||
| throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to change disk offering for the Shared FileSystem"); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.