[7.460][BUG][FIXED] Deletion of a host definition gives strange error.

I did a search as usual but couldn't find anyone else mentioning it so here it goes...
If you try to delete a host definition that is being used, you are presented with an error in the screenshot. Not really informative, even old v6 always said can't delete because its in use which is not great but made sense[:)]
By the way its being used in a disabled rule under dnat.
Parents

  • If you try to delete a host definition that is being used,
    you are presented with an error in the screenshot.


    Not in general, only in some cases that were missed... [;)]


    Not really informative, even old v6 always said can't delete
    because its in use which is not great but made sense [[:)]]


    Sure.
    In 7.40x, most of the object deletion messages are not very informative.
    Better messages, in particular for object deletion, is one of the areas where 7.500 got considerable improvements.


    By the way its being used in a disabled rule under dnat.


    Wow, that's a really good catch, thanks!
    It was very important to mention DNAT here, otherwise,
    it would have been impossible to understand the report.

    You know, handling of the source and destination hosts and services in SNAT, DNAT and FNAT is quite special because all of these may be empty, but not all of them at the same time.  For nearly all other object types, emptiness of attributes can be allowed or disallowed statically in /var/confd/res/objects (_empty attributes), but for DNAT/SNAT, it must be done dynamically by a dedicated validation function inside the Confd binary itself.  I missed this very special case when implementing the new, precise messages.

    Now fixed for 7.470, please retry when that one goes public!
    The message will tell you more than just "can't delete because still in use"...  [[:)]]

    Thanks,
      Ingo
Reply

  • If you try to delete a host definition that is being used,
    you are presented with an error in the screenshot.


    Not in general, only in some cases that were missed... [;)]


    Not really informative, even old v6 always said can't delete
    because its in use which is not great but made sense [[:)]]


    Sure.
    In 7.40x, most of the object deletion messages are not very informative.
    Better messages, in particular for object deletion, is one of the areas where 7.500 got considerable improvements.


    By the way its being used in a disabled rule under dnat.


    Wow, that's a really good catch, thanks!
    It was very important to mention DNAT here, otherwise,
    it would have been impossible to understand the report.

    You know, handling of the source and destination hosts and services in SNAT, DNAT and FNAT is quite special because all of these may be empty, but not all of them at the same time.  For nearly all other object types, emptiness of attributes can be allowed or disallowed statically in /var/confd/res/objects (_empty attributes), but for DNAT/SNAT, it must be done dynamically by a dedicated validation function inside the Confd binary itself.  I missed this very special case when implementing the new, precise messages.

    Now fixed for 7.470, please retry when that one goes public!
    The message will tell you more than just "can't delete because still in use"...  [[:)]]

    Thanks,
      Ingo
Children