-
Notifications
You must be signed in to change notification settings - Fork 0
feature/CSTACKEX-46: Create, Delete iSCSI type Cloudstack volumes, Enter, Cancel Maintenance mode #27
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
base: main
Are you sure you want to change the base?
Conversation
…Storage pool workflows
…cel Maintenance mode
…base and renamed plugin name
…base in agent code
…ragePool create and delete
| if (volumeVO != null) { | ||
| volumeVO.setPath(null); | ||
| if (cloudStackVolume.getLun().getUuid() != null) { | ||
| volumeVO.setFolder(cloudStackVolume.getLun().getUuid()); |
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.
Add a comment on the need for this
| if (mapResp != null && mapResp.containsKey(Constants.LOGICAL_UNIT_NUMBER)) { | ||
| String lunNumber = mapResp.get(Constants.LOGICAL_UNIT_NUMBER); | ||
| s_logger.info("ensureLunMapped: Existing LunMap found for LUN [{}] in igroup [{}] with LUN number [{}]", lunName, accessGroupName, lunNumber); | ||
| return lunNumber; |
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.
Add a TODO comment to keep an eye on possibility of duplicate LUN for luns
| VolumeVO volumeVO = volumeDao.findById(volInfo.getId()); | ||
| if (volumeVO != null) { | ||
| String iscsiPath = Constants.SLASH + storagePool.getPath() + Constants.SLASH + lunNumber; | ||
| volumeVO.set_iScsiName(iscsiPath); |
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.
Remove any redundant code
| return false; | ||
| } | ||
| // Set the aggregates which are according to the storage requirements | ||
| for (Aggregate aggr : aggrs) { |
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.
Check for rebase issue here
| Map<String, Object> queryParams = Map.of("allow_delete_while_mapped", "true"); | ||
| try { | ||
| sanFeignClient.deleteLun(authHeader, cloudstackVolume.getLun().getUuid(), queryParams); | ||
| } catch (Exception ex) { |
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.
Check if feignException should be added
| String authHeader = Utility.generateAuthHeader(storage.getUsername(), storage.getPassword()); | ||
| sanFeignClient.deleteLunMap(authHeader, lunUUID, igroupUUID); | ||
| s_logger.info("disableLogicalAccess: LunMap deleted successfully."); | ||
| } catch (Exception e) { |
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.
Use feignException
Description
This PR has the following changes:
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Passcode: n=AE=.C9
Passcode: $%j3+K4B
Observations:
Though we have increased retries to wait for discovery of luns, the additional volume attachment still times out, so, it needs a manual retry.
When placed into Maintenance mode, Instance is getting Stopped in the first case while it remains in Running state in the second case. We currently don't have any code attributing to this behaviour in our plugin code. Need to understand why cloudstack is behaving this way.
I've also tested force delete of storage pool when CS volumes were present, but, haven't covered it in these recordings.