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
Removing from a repo with mof_compiler script #1158
Comments
Discussion point: Mandatory for 0.13.0? |
We decided in the call today that this would be considered optional for 0.13.0 |
We decided to move this issue to the next release. |
We decided to put this into 1.0.0 and roll it back to 0.15.0. Setting discussion needed to keep this one above the horizon. |
I know the problems now.
First issue: It is the compiler again and our use of it in mofcomp -r. The remove logic compiles the defined files into the local MOFWBEMConnection. However, when we send the delete requests for the instancesto the server we do not have a complete path since we compiled them without aliases which is what sets the path component in the compiler. WHOOPS. So the server simply cannot find the instances to remove. Since the server cannot find and remove instances, it also fails any class removal because there are instances. Proposed Fix: Create a new adaption of MOFWBEMConnection that adds path as the files to be removed are recompiled. Here is an example of the request as Pegasus sees it:
Second Issue: Issues Found: a. Compiler not passing LocalOnly=False, IncludeQualifiers=True in some cases of GetClass (which is recursive) so that in the recursion, the class was returned with key qualifier not set or key properties not in class. This causes reference properties in Association classes to be compiled with empty keybindings. b. In reference properties of Association classes where the value is defined by an instance alias, the CIMNamespace is defined with the namespace component set. DISCUSSION So if an association class where the reference properties are keys (Sadly, CIM_Collection and all it subclasses) is compiled from MOF by the pegasus MOF compiler but the pywbem mof compiler is used to remove the instances, pegasus cannot find the instances because each has the namespace set in the path of the Delete request but not in the path in the WBEM Server. |
Note that pegasus also returns NOT_FOUND for at least one class, Pywbem_Person but I have not sorted out the reason for that.
|
This is going to take more than a day to fix. |
The first error encountered was that in the rollback logic the instance paths are not set into instances when they are created locally. This is because the normal compile with the pyebem mof compiler does not force this. We cannot do this by forcing the Alias on every instance created in the mof to be able to remove it so the solution is to create a new MOFWBEMConnection adaption that set the path into the mof as it is created as part of the remove. Added a test to test_mof_compiler.py to assure that we are propagating key property qualifiers correctly because that appears to be another issue in the remove.
Will be fixed with PR #1944 (for master) and TBD for 0.15.0. |
The first error encountered was that in the rollback logic the instance paths are not set into instances when they are created locally. This is because the normal compile with the pyebem mof compiler does not force this. We cannot do this by forcing the Alias on every instance created in the mof to be able to remove it so the solution is to create a new MOFWBEMConnection adaption that set the path into the mof as it is created as part of the remove. Added a test to test_mof_compiler.py to assure that we are propagating key property qualifiers correctly because that appears to be another issue in the remove.
DISCUSSION: Found two problems (see above) Fixed first but have not figured out why the second is happening. The question is, whether this is worthwhile for 0.15.0 since it has been broken for many years and nobody noticed. I propose that If I cannot define a fix for the second problem (association being created as part of the remove process with incomplete reference property (keybindings empty) when all other 0,15.5 release is ready, we commit what is fixed and redo bug. Note that there are no tests for this, or even for the mof_compiler script. |
The first error encountered was that in the rollback logic the instance paths are not set into instances when they are created locally. This is because the normal compile with the pyebem mof compiler does not force this. We cannot do this by forcing the Alias on every instance created in the mof to be able to remove it so the solution is to create a new MOFWBEMConnection adaption that set the path into the mof as it is created as part of the remove. Added a test to test_mof_compiler.py to assure that we are propagating key property qualifiers correctly because that appears to be another issue in the remove.
The first error encountered was that in the rollback logic the instance paths are not set into instances when they are created locally. This is because the normal compile with the pyebem mof compiler does not force this. We cannot do this by forcing the Alias on every instance created in the mof to be able to remove it so the solution is to create a new MOFWBEMConnection adaption that set the path into the mof as it is created as part of the remove. The second issue found was that the property values for reference properties in associations where the value is defined by the mof compiler alias were being inserted into the instance with keybindings with no keys. Corrects this issue in mof_compiler.py; incorrect parameter on GetClass was being passed to recursive GetClass call that could result in compiler processing classes for key qualifier but the getclass with IncludeQualifiers=False meant no keys were found. Thus, reference properties in instances where value defined by alais were built with empty keybindings. Added a test to test_mof_compiler.py to assure that we are propagating key property qualifiers correctly. Adds a bash script to test mof_compiler As a temporary measure, this adds a script that executes mof_compiler multiple time with the same MOF to add the MOF to a defined server, remove it and do that a second time. This is a very limited test using a local WBEM Server and is in the manualtests group.
Fixed in PR #1944 for master, and TBD for 0.15.0. |
The first error encountered was that in the rollback logic the instance paths are not set into instances when they are created locally. This is because the normal compile with the pyebem mof compiler does not force this. We cannot do this by forcing the Alias on every instance created in the mof to be able to remove it so the solution is to create a new MOFWBEMConnection adaption that set the path into the mof as it is created as part of the remove. The second issue found was that the property values for reference properties in associations where the value is defined by the mof compiler alias were being inserted into the instance with keybindings with no keys. Corrects this issue in mof_compiler.py; incorrect parameter on GetClass was being passed to recursive GetClass call that could result in compiler processing classes for key qualifier but the getclass with IncludeQualifiers=False meant no keys were found. Thus, reference properties in instances where value defined by alais were built with empty keybindings. Added a test to test_mof_compiler.py to assure that we are propagating key property qualifiers correctly. Adds a bash script to test mof_compiler As a temporary measure, this adds a script that executes mof_compiler multiple time with the same MOF to add the MOF to a defined server, remove it and do that a second time. This is a very limited test using a local WBEM Server and is in the manualtests group.
Fixes issue in mof_compiler where the remove option fails to remove mof created by an earlier compile of the same file. Adds a test for this to test_mofcompiler.py based on using the mocker and test.mof
Fixes issue in mof_compiler where the remove option fails to remove mof created by an earlier compile of the same file. This was primarily an issue of getting the instance paths correct on the CreateInstance. Adds a test for rollbacik to test_mofcompiler.py based on using the mocker and test.mof Adds a second manual test against a server at http://localhost that executes mof_compiler to create and rollback multiple times in two namespaces. Adds documentation on the rollback limitations to the rollback method documentation.
Fixes issue in mof_compiler where the remove option fails to remove mof created by an earlier compile of the same file. This was primarily an issue of getting the instance paths correct on the CreateInstance. Adds a test for rollbacik to test_mofcompiler.py based on using the mocker and test.mof Adds a second manual test against a server at http://localhost that executes mof_compiler to create and rollback multiple times in two namespaces. Adds documentation on the rollback limitations to the rollback method documentation.
Fixes issue in mof_compiler where the remove option fails to remove mof created by an earlier compile of the same file. This was primarily an issue of getting the instance paths correct on the CreateInstance. Adds a test for rollbacik to test_mofcompiler.py based on using the mocker and test.mof Adds a second manual test against a server at http://localhost that executes mof_compiler to create and rollback multiple times in two namespaces. Adds documentation on the rollback limitations to the rollback method documentation.
Removing items from the repo with mof_compiler appears to be incomplete. After a correct install,
We executed the following:
The results are inconsistent.
The text was updated successfully, but these errors were encountered: