Karaf
  1. Karaf
  2. KARAF-952

config:propdel doesn't delete the property in the cfg file

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.4, 3.0.0
    • Fix Version/s: 2.2.5, 3.0.0
    • Component/s: karaf-config
    • Labels:
      None

      Description

      When invoking:

      config:edit my.pid
      config:propdel key
      config:update

      the etc/my.pid.cfg still contain the key property.

        Activity

        Hide
        Jean-Baptiste Onofré added a comment -

        The issue is that the config:update command reload the properties from the cfg file, apply the change (new properties or property changes) and save back:

        Properties p = new Properties(storageFile);

        It means that if we remove a property in the session, it's not removed from the file.

        We should check the properties present in p but not present in the session properties, and remove it from p.

        Show
        Jean-Baptiste Onofré added a comment - The issue is that the config:update command reload the properties from the cfg file, apply the change (new properties or property changes) and save back: Properties p = new Properties(storageFile); It means that if we remove a property in the session, it's not removed from the file. We should check the properties present in p but not present in the session properties, and remove it from p.
        Hide
        Jean-Baptiste Onofré added a comment -

        Fixed on trunk: revision 1188626.

        Show
        Jean-Baptiste Onofré added a comment - Fixed on trunk: revision 1188626.
        Hide
        Jean-Baptiste Onofré added a comment -

        Fixed on karaf-2.2.x: revision 1188630.

        Show
        Jean-Baptiste Onofré added a comment - Fixed on karaf-2.2.x: revision 1188630.
        Hide
        Jean-Baptiste Onofré added a comment -

        The shell command has been fixed, but the ConfigMBean should be updated too.

        Show
        Jean-Baptiste Onofré added a comment - The shell command has been fixed, but the ConfigMBean should be updated too.
        Hide
        Jean-Baptiste Onofré added a comment -

        Fixed on trunk: revision 1189161.
        Fixed on karaf-2.2.x: revision 1189162.

        Show
        Jean-Baptiste Onofré added a comment - Fixed on trunk: revision 1189161. Fixed on karaf-2.2.x: revision 1189162.

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Jean-Baptiste Onofré
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development