Comments (17)
Hi @Zuldan, awesome it is working OK (except for these glitches). I think I know what might be causing the problem - the resource is not correctly detecting that the partition has already been created, so is trying to create a new one (which reports that there is no capacity to add a new partition).
I'll put some work into writing some tests to confirm this this weekend and then create a fix (good old TDD methodology). 😁
from storagedsc.
Thank you very much @PlagueHO
from storagedsc.
@Zuldan - anytime sir! I ran out of time this weekend and tonight, but I'll get onto this tomorrow night. Hope that is OK?
from storagedsc.
No problem at all ;-)
from storagedsc.
Hi @Zuldan, I'm just working on adding tests for this scenario (so I can then write the fix) and have a question: when you say you delete the mount point: are you deleting the folder that the mount point was mounted to or are you unmounting the access path using a cmdlet or GUI? I'm just trying to write tests that replicate this behavior.
from storagedsc.
@PlagueHO I'm deleting the folder.
from storagedsc.
@Zuldan - Ok cool! I've managed to replicate it by using Remove-PartitionAccessPath
to remove the mount. So, I've now got failing tests.
from storagedsc.
@Zuldan - making good progress on this. I have found the bug and just reworking the code to better support this use case. I'll try and get this PR through tomorrow night.
from storagedsc.
Cool! thanks for the update.
from storagedsc.
Hi @Zuldan - The code change is finished including integration/regression tests to cover this scenario. I've still got to complete the unit tests though - which I aim to complete tomorrow night.
If you're feeling enthusiastic you can try out the new version here in my fork.
from storagedsc.
@PlagueHO I can confirm it's now working as expected.
from storagedsc.
Awesome! Thanks @Zuldan. I was going to try and get the unit tests done tonight but I'm knackered and will just end up doing something dumb. So I'll get them done tomorrow night 😁
from storagedsc.
@kwirkykat - I'll include the conversion of the integration tests workspace folder over to $TestDrive in the PR for this issue. I need to include this because all my tests broke 😁
from storagedsc.
@kwirkykat - another question: Since the recent changes to PSSA checking (I'm not sure if it was a change to DSCResource.Tests or PSSA), but the WMI cmdlets that xDisk uses are being flagged as PSSA violations. So I can't submit the PR for this the xDiskAccessPath fix without resolving this.
xDisk uses CIM by default but falls back to WMI if that fails. I'm fairly sure we can remove the WMI calls safely, but someone must have added the fall back to WMI for a reason (unfortunately the comments don't say why this was done). So removing them may cause failures in earlier OS's.
So:
Option 1 - remove the WMI calls
Option 2 - suppress the WMI PSSA violations
What are your thoughts?
from storagedsc.
@Zuldan - I've completed the PR now and it just needs to go through the review process.
from storagedsc.
Thanks so much @PlagueHO. Apologies for the additional work this has created. The contribution of your personal time to the community is invaluable.
from storagedsc.
@Zuldan - always a pleasure! And this needed to be done. I'm actually much happier with the design pattern now as it handles many other scenarios. I'll be copying this design over to xDisk when I have the time because xDisk will suffer from the similar problems.
This new design will also better support the future "Destructive" flag to allow rewriting the partition table.
from storagedsc.
Related Issues (20)
- Enable Code Coverage Reporting
- StorageDSC.Common: Assert-AccessPathValid does not properly validate slashes. HOT 1
- Get-DiskByIdentifier: Allow selection based on Serial Number
- Disk with Number '2' is already initialized with partition style '' but 'MBR' is required. HOT 1
- Update Azure DevOps Pipeline Images
- Update CI Pipeline Files from Latest Pattern
- Convert to class-based resources
- Convert tests to Pester 5
- DSC_Disk trigers defrag HOT 1
- Get-DiskByIdentifier: Allow FriendlyName property to be used as a disk identifier HOT 1
- Automatic Documentation Generation Fails on Ubuntu-22.04 build image
- Access denied to mount iso HOT 15
- OpticalDiskDriveLetter: The optical disk 1 could not be found in the system on Azure Windows Server 2022
- DSC_Disk: Add support for creating Dev Drive volume HOT 6
- VirtualHardDisk: New resource proposal HOT 3
- The deploy fails because there is a space in a tag in the module manifest HOT 3
- Trigger BREAKING CHANGE from PR #278 HOT 1
- Dev Drive DSC error message when not run as admin HOT 2
- OpticalDiskDriveLetter: DVD Drive for Windows Server Gen2 (UEFI) OS Images filtered HOT 12
- Make Supporting Helper Functions Public so that they can be tested/autodoced
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storagedsc.