Bug #2933

nethserver-mail-group-acl-cleanup FAILED: group not deleted

Added by Filippo Carletti almost 7 years ago. Updated almost 7 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-mail-server
Target version:v6.5
Security class: Resolution:
Affected version:v6.5-final NEEDINFO:No

Description

When deleting a group, no error is shown but a new group with the same name can't be created.
Creating the same group, the error on screen is:
Group name `groupname` has been already registered
The account is still present in the accounts db as a group-deleted.
/var/log/messages reports:
Action: /etc/e-smith/events/group-delete/S03nethserver-mail-group-acl-cleanup FAILED: 29

If the group has mail delivery, deletion succeed.
Also, when deletion fails, the group list page still shows the deleted group. Reloading the page, the deleted group disappears.
And, the services tab does not show the email address (is this a different problem?).

Workaround:
db accounts delete <group_name>


Related issues

Related to Nethgui - Feature #2936: TableAdapter: force refresh on save() CLOSED

Associated revisions

Revision c61f2a64
Added by Davide Principi almost 7 years ago

Exit cleanly if group has mail disabled. Refs #2933

Fix nethserver-mail-group-acl-cleanup action - bug #2933

History

#1 Updated by Davide Principi almost 7 years ago

  • Subject changed from Group not deleted to nethserver-mail-group-acl-cleanup FAILED: group not deleted
  • Status changed from NEW to TRIAGED
  • Target version set to v6.5
  • % Done changed from 0 to 20
  • Affected version changed from v6.5 to v6.5-final

#2 Updated by Davide Principi almost 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#3 Updated by Davide Principi almost 7 years ago

Filippo Carletti wrote:

When deleting a group, no error is shown but a new group with the same name can't be created.

ok, reproducible

If the group has mail delivery, deletion succeed.

ok,

Also, when deletion fails, the group list page still shows the deleted group. Reloading the page, the deleted group disappears.

I can't fix it here. The logic is in Nethgui, and I opened the issue #2936 there.

And, the services tab does not show the email address (is this a different problem?).

It's caused by the wrong group-deleted state: should be fixed.

#4 Updated by Davide Principi almost 7 years ago

  • Related to Feature #2936: TableAdapter: force refresh on save() added

#5 Updated by Davide Principi almost 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

#6 Updated by Davide Principi almost 7 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-mail-server-1.8.1-1.1gitc61f2a6.ns6.noarch.rpm

#7 Updated by Giacomo Sanchietti almost 7 years ago

  • Assignee set to Giacomo Sanchietti

#8 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 90

VERIFIED

Deleting group without mail:

Oct 29 14:17:07 localhost /sbin/e-smith/db[4905]: /var/lib/nethserver/db/accounts: OLD g1=group|Description||Gid|5001|MailStatus|disabled|Members|
Oct 29 14:17:07 localhost /sbin/e-smith/db[4905]: /var/lib/nethserver/db/accounts: NEW g1=group-deleted|Description||Gid|5001|MailStatus|disabled|Members|
Oct 29 14:17:07 localhost esmith::event[4907]: Event: group-delete g1
Oct 29 14:17:07 localhost esmith::event[4907]: Action: /etc/e-smith/events/group-delete/S03nethserver-mail-default-pseudonyms-delete SUCCESS [0.054731]
Oct 29 14:17:07 localhost esmith::event[4907]: Action: /etc/e-smith/events/group-delete/S03nethserver-mail-group-acl-cleanup SUCCESS [0.054999]
Oct 29 14:17:07 localhost esmith::event[4907]: expanding /etc/postfix/vmailbox
Oct 29 14:17:07 localhost esmith::event[4907]: expanding /etc/postfix/aliases
Oct 29 14:17:07 localhost esmith::event[4907]: expanding /etc/postfix/virtual
Oct 29 14:17:07 localhost esmith::event[4907]: expanding /etc/postfix/internal_access
Oct 29 14:17:07 localhost esmith::event[4907]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.116284]
Oct 29 14:17:07 localhost esmith::event[4907]: Action: /etc/e-smith/events/group-delete/S15group-delete-unix SUCCESS [0.061822]
Oct 29 14:17:07 localhost esmith::event[4907]: Action: /etc/e-smith/events/group-delete/S16nethserver-mail-group-delete-subscriptions SUCCESS [0.054219]
Oct 29 14:17:07 localhost esmith::event[4907]: Home directory for g1 account does not exist; skipped at /etc/e-smith/events/group-delete/S30nethserver-mail-account-cleanup line 39.
Oct 29 14:17:07 localhost esmith::event[4907]: Action: /etc/e-smith/events/group-delete/S30nethserver-mail-account-cleanup SUCCESS [0.003779]
Oct 29 14:17:07 localhost esmith::event[4907]: postmap: warning: /etc/postfix/internal_access.db: duplicate entry: "localhost.localdomain" 
Oct 29 14:17:07 localhost esmith::event[4907]: Action: /etc/e-smith/events/group-delete/S30nethserver-mail-postmap-update SUCCESS [0.094808]
Oct 29 14:17:07 localhost esmith::event[4907]: Event: group-delete SUCCESS
Oct 29 14:17:07 localhost /sbin/e-smith/db[4921]: /var/lib/nethserver/db/accounts: DELETE g1=group-deleted|Description||Gid|5001|MailStatus|disabled|Members|

Deleting group with mail:

Oct 29 14:17:46 localhost /sbin/e-smith/db[4929]: /var/lib/nethserver/db/accounts: OLD g2=group|Description||Gid|5002|MailDeliveryType|copy|MailStatus|enabled|Members|
Oct 29 14:17:46 localhost /sbin/e-smith/db[4929]: /var/lib/nethserver/db/accounts: NEW g2=group-deleted|Description||Gid|5002|MailDeliveryType|copy|MailStatus|enabled|Members|
Oct 29 14:17:46 localhost esmith::event[4931]: Event: group-delete g2
Oct 29 14:17:46 localhost /etc/e-smith/events/group-delete/S03nethserver-mail-default-pseudonyms-delete[4932]: /var/lib/nethserver/db/accounts: DELETE test2@=pseudonym|Access|public|Account|g2|Description||_prevAccount|g2
Oct 29 14:17:46 localhost esmith::event[4931]: Action: /etc/e-smith/events/group-delete/S03nethserver-mail-default-pseudonyms-delete SUCCESS [0.06184]
Oct 29 14:17:46 localhost esmith::event[4931]: Action: /etc/e-smith/events/group-delete/S03nethserver-mail-group-acl-cleanup SUCCESS [0.100237]
Oct 29 14:17:46 localhost esmith::event[4931]: expanding /etc/postfix/vmailbox
Oct 29 14:17:46 localhost esmith::event[4931]: expanding /etc/postfix/aliases
Oct 29 14:17:46 localhost esmith::event[4931]: expanding /etc/postfix/virtual
Oct 29 14:17:46 localhost esmith::event[4931]: expanding /etc/postfix/internal_access
Oct 29 14:17:46 localhost esmith::event[4931]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.129919]
Oct 29 14:17:46 localhost esmith::event[4931]: Action: /etc/e-smith/events/group-delete/S15group-delete-unix SUCCESS [0.078821]
Oct 29 14:17:46 localhost esmith::event[4931]: Action: /etc/e-smith/events/group-delete/S16nethserver-mail-group-delete-subscriptions SUCCESS [0.056522]
Oct 29 14:17:46 localhost esmith::event[4931]: Action: /etc/e-smith/events/group-delete/S30nethserver-mail-account-cleanup SUCCESS [0.004265]
Oct 29 14:17:47 localhost esmith::event[4931]: postmap: warning: /etc/postfix/internal_access.db: duplicate entry: "localhost.localdomain" 
Oct 29 14:17:47 localhost esmith::event[4931]: Action: /etc/e-smith/events/group-delete/S30nethserver-mail-postmap-update SUCCESS [0.117714]
Oct 29 14:17:47 localhost esmith::event[4931]: Event: group-delete SUCCESS
Oct 29 14:17:47 localhost /sbin/e-smith/db[4952]: /var/lib/nethserver/db/accounts: DELETE g2=group-deleted|Description||Gid|5002|MailDeliveryType|copy|MailStatus|enabled|Members|

Also creation of the delete groups works fine.

Also, when deletion fails, the group list page still shows the deleted group. Reloading the page, the deleted group disappears.

I can't fix it here. The logic is in Nethgui, and I opened the issue #2936 there.

If the event doesn't fail, the bug is not reproducible.

#9 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-updates:
  • nethserver-mail-server-1.8.2-1.ns6.noarch.rpm

Also available in: Atom PDF