Bug 537980 - [raw-config] Structured config edits are failing to commit
Summary: [raw-config] Structured config edits are failing to commit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Configuration
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: John Sanda
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: RHQ_RawConfig
TreeView+ depends on / blocked
 
Reported: 2009-11-17 02:25 UTC by Preethi Thomas
Modified: 2010-08-12 16:56 UTC (History)
1 user (show)

Fixed In Version: 2.4
Clone Of:
: 546382 (view as bug list)
Environment:
Last Closed: 2010-08-12 16:56:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2009-11-17 02:25:56 UTC
Description of problem:
"No changes were made to the configuration, so no update request has been sent to the Agent." message is displayed if you edit a config in structured mode


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Login to RHQ server with agent running
2. Select the Structured & Raw server
3. Click on the configure tab
4. Click on change properties
5. change a value and click save
  
Actual results:

"No changes were made to the configuration, so no update request has been sent to the Agent." message is displayed.

Expected results:

To be able to commit the structured config change


Additional info:

Comment 1 Preethi Thomas 2009-11-18 16:26:27 UTC
Even the existing plugins fails to commmit the edits from structured config.
It displays a message "Maps updated".

Comment 2 Adam Young 2009-11-23 17:25:13 UTC
Added this code to ConfigurationManagerBean


+ void dumpProperties(Configuration c) {
+        for (String key : c.getAllProperties().keySet()) {
+            log.error("property " + key + " = " + c.get(key));
+        }
+    }

    @Nullable
    public ResourceConfigurationUpdate updateResourceConfiguration(Subject subject, int resourceId,
        @XmlJavaTypeAdapter(ConfigurationAdapter.class) Configuration newConfiguration)
        throws ResourceNotFoundException {
        // must do this in a separate transaction so it is committed prior to sending the agent request
        // (consider synchronizing to avoid the condition where someone calls this method twice quickly
        // in two different txs which would put two updates in INPROGRESS and cause havoc)
        ResourceConfigurationUpdate newUpdate;
+        dumpProperties(newConfiguration);
        // here we call ourself, but we do so via the EJB interface so we pick up the REQUIRES_NEW semantics
        // this can return null if newConfiguration is not actually different.
        newUpdate = configurationManager.persistNewResourceConfigurationUpdateHistory(subject, resourceId,
            newConfiguration, ConfigurationUpdateStatus.INPROGRESS, subject.getName(), false);



This shows the values that were changed in  the UI being passed down correctly.

Comment 3 Adam Young 2009-12-03 22:41:13 UTC
Problem was with how the configuration object was shared between raw and structured, which didn't match the pre-existing code.  Code has been pushed to origin/raw-config on Fedora Hosted and confirmed to work on my local machine.  We should see the hudson test failures stop off in a build shortly.

Comment 4 Preethi Thomas 2009-12-04 17:45:11 UTC
Fails_qa
tried to edit hosts config
the message said "Maps Updated"
And the hosts config UI displayed the edited value. but when I navigated to the history page there was no record of the new commit. Also checked in the hosts file of the managed platform and it did not reflect the change.
But the change stayed in the memory until I logged out of the rhq server.

Comment 5 Preethi Thomas 2009-12-10 16:41:48 UTC
I think this is user error on my part. moving to fixed.
Will reopen if it fails again.

Comment 6 Preethi Thomas 2009-12-15 15:58:19 UTC
I am changing the status to on_qa to test after integration with master.

Comment 7 Preethi Thomas 2010-01-07 14:05:18 UTC
This has been resolved. was able to make changes & save changes to the /etc/hosts file.

verified in master http://10.16.120.159:7080/

Comment 8 Corey Welton 2010-08-12 16:56:31 UTC
Mass-closure of verified bugs against JON.


Note You need to log in before you can comment on or make changes to this bug.