Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1343 closed defect (fixed)

Bindctl doesn't remove stuff from default value of named_set

Reported by: vorner Owned by: jelte
Priority: medium Milestone: Sprint-20111108
Component: ~bind-ctl (obsolete) Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 4 Add Hours to Ticket:
Total Hours: 0:23(review) Internal?: no

Description

When there's a named_set and it has a default value from the spec file, one can't delete elements from it until it's modified in a different way. Better shown in an example (this happens with virgin configuration):

> config remove Boss/components b10-xfrin
> config diff
{}
> config add Boss/components new
> config diff
{'Boss': {'components': {'b10-xfrin': {'address': 'Xfrin'}, 'b10-cmdctl': {'kind': 'needed', 'special': 'cmdctl'}, 'b10-xfrout': {'address': 'Xfrout'}, 'b10-auth': {'kind': 'needed', 'special': 'auth'}, 'b10-zonemgr': {'address': 'Zonemgr'}, 'b10-stats': {'address': 'Stats'}, 'new': {}, 'b10-stats-httpd': {'address': 'StatsHttpd'}}}}
> config remove Boss/components b10-xfrin
> config diff
{'Boss': {'components': {'b10-cmdctl': {'kind': 'needed', 'special': 'cmdctl'}, 'b10-xfrout': {'address': 'Xfrout'}, 'b10-auth': {'kind': 'needed', 'special': 'auth'}, 'b10-zonemgr': {'address': 'Zonemgr'}, 'b10-stats': {'address': 'Stats'}, 'new': {}, 'b10-stats-httpd': {'address': 'StatsHttpd'}}}}
> config remove Boss/components new
> config diff
{'Boss': {'components': {'b10-cmdctl': {'kind': 'needed', 'special': 'cmdctl'}, 'b10-xfrout': {'address': 'Xfrout'}, 'b10-auth': {'kind': 'needed', 'special': 'auth'}, 'b10-zonemgr': {'address': 'Zonemgr'}, 'b10-stats': {'address': 'Stats'}, 'b10-stats-httpd': {'address': 'StatsHttpd'}}}}

Notice the empty diff after first remove (if you look at the content before changing config anyhow, the b10-xfrin is there).

After it's forced to create non-empty diff, it happily removes things from there.

The example expects being descendant of #213 (nothing in current master uses the named_set yet, let aside with non-trivial default value).

Subtickets

Change History (9)

comment:1 Changed 8 years ago by jelte

  • Add Hours to Ticket changed from 0 to 4

comment:2 Changed 8 years ago by jelte

  • Add Hours to Ticket 4 deleted
  • Estimated Difficulty changed from 0 to 4

comment:3 Changed 8 years ago by jelte

  • Milestone changed from Next-Sprint-Proposed to Sprint-20111108

comment:4 Changed 8 years ago by jelte

  • Owner set to jelte
  • Status changed from new to assigned

comment:5 Changed 8 years ago by jelte

  • Owner changed from jelte to UnAssigned
  • Status changed from assigned to reviewing

comment:6 Changed 8 years ago by jinmei

Looks okay (but I saw a gap between the diff itself and the reported
symptom. Additional notes for the reviewer would have been helpful.)

comment:7 Changed 8 years ago by jinmei

  • Owner changed from UnAssigned to jelte

comment:8 Changed 8 years ago by jelte

  • Resolution set to fixed
  • Status changed from reviewing to closed

Sorry about not providing some more comments, I'll do so next time.

Thanks, merged, closing ticket.

comment:9 Changed 8 years ago by jinmei

  • Total Hours changed from 0 to 0:23(review)
Note: See TracTickets for help on using tickets.