Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZCS-11191: [Backend] Integrate postsrsd #1274

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

carlosromero03
Copy link
Contributor

@carlosromero03 carlosromero03 commented May 25, 2022

Problem

This PR has the solution for ZCS-11191, which is about to implement a mechanism to enable/disable the PostSRSd service in Zimbra.

Solution

  • It's necessary to integrate the PostSRSd service into zimbraServiceEnabled LDAP property.
  • When "postsrs" service is present in the zimbraServiceEnabled list, the service has to be enabled.
  • When "postsrs" service is not present in the zimbraServiceEnabled list, the service has to be disabled.
  • The enable/disable process is doing by calling Linux commands from Java code into the ModifyServer.java class.

Notes

  • It's necessary to have "postsrsd" daemon installed into Zimbra 9.0.0+. You can follow the steps explained in ZCS-11193, where you will find the .deb package to be installed.
  • Even when this solution seems to work, I was talking with Stephan and he told me there was a defined pattern to enable/disable services into the zm-core-utils project. This part is not implemented yet.

Testing Done

This solution can be tested following the next steps:

  • Login to AdminConsole
  • Go to Home > Configure > Servers > [your_server] > Services
  • A list of services will be displayed. These services can be enabled/disabled using their respective checkbox and hitting the “Save” button.
  • Because of the absence of a checkbox for “postsrs” service, you can use the "edit and resend" tool from Mozilla Firefox. Just open the DevTools, right click on the ModifyServerRequest, add the new service "postsrs" to the zimbraServiceEnabled list, and finally hit the “Send” button again.
  • I have tested 4 possible scenarios and documented them on the ZCS-11191.PDF file, which you can find on JIRA ticket.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ carlosromero03
❌ swaatiTelus
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -1527,7 +1527,9 @@ public enum PUBLIC_SHARE_VISIBILITY { samePrimaryDomain, all, none };
public static final KnownKey zimbra_strict_unclosed_comment_tag = KnownKey.newKey(true);
public static final KnownKey zimbra_skip_tags_with_unclosed_cdata = KnownKey.newKey("style");


//ZCS-11191 : Allow to enable/disable SRS feature
public static final KnownKey zimbra_srs_enabled = KnownKey.newKey(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to put this into LC instead of LDAP? are we planning to release this feature in a patch?

@@ -58,6 +67,8 @@ public Element handle(Element request, Map<String, Object> context) throws Servi
}
checkRight(zsc, context, server, attrs);

startOrStopPostSRSd(server, attrs);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this going to be called with every modifyServer call?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silentsakky, I think the same this code should not be here, as zmcontrol and all other service's stop/start functionality is written in zm-core-utils repo, which is in Perl script. This logic should also be written in that repo, also would like to confirm the same with @desouzas .
@desouzas : Could you please provide your inputs here? Thanks..!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants