From c72d29f401e2dfa37d8077cf25cb2f013a11e2b4 Mon Sep 17 00:00:00 2001 From: Austin McKinley Date: Wed, 19 Dec 2018 16:24:12 -0800 Subject: [PATCH] Cleanup some clustering rough edges Summary: Suppress an unhelpful Almanac transaction and document the location of the secret clustering management capability. I thought maybe implementing `shouldHide` and checking for `isCreate` would work, but the binding apparently gets created before an interface is bound to it. Test Plan: Looked at a fresh binding and didn't see "Unknown Object(??)", ran bin/diviner and saw expected output. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D19917 --- .../AlmanacBindingInterfaceTransaction.php | 21 ++++++++++++++----- .../user/cluster/cluster_repositories.diviner | 13 +++++++++++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/applications/almanac/xaction/AlmanacBindingInterfaceTransaction.php b/src/applications/almanac/xaction/AlmanacBindingInterfaceTransaction.php index f43fcdfa86..03effc028e 100644 --- a/src/applications/almanac/xaction/AlmanacBindingInterfaceTransaction.php +++ b/src/applications/almanac/xaction/AlmanacBindingInterfaceTransaction.php @@ -55,11 +55,22 @@ final class AlmanacBindingInterfaceTransaction } public function getTitle() { - return pht( - '%s changed the interface for this binding from %s to %s.', - $this->renderAuthor(), - $this->renderOldHandle(), - $this->renderNewHandle()); + if ($this->getOldValue() === null) { + return pht( + '%s set the interface for this binding to %s.', + $this->renderAuthor(), + $this->renderNewHandle()); + } else if ($this->getNewValue() == null) { + return pht( + '%s removed the interface for this binding.', + $this->renderAuthor()); + } else { + return pht( + '%s changed the interface for this binding from %s to %s.', + $this->renderAuthor(), + $this->renderOldHandle(), + $this->renderNewHandle()); + } } public function validateTransactions($object, array $xactions) { diff --git a/src/docs/user/cluster/cluster_repositories.diviner b/src/docs/user/cluster/cluster_repositories.diviner index 13307d0b79..9e4b324a58 100644 --- a/src/docs/user/cluster/cluster_repositories.diviner +++ b/src/docs/user/cluster/cluster_repositories.diviner @@ -98,7 +98,7 @@ repository to retrieve the data it needs. It will use the result of this query to respond to the user. -Setting up a Cluster Services +Setting up Cluster Services ============================= To set up clustering, first register the devices that you want to use as part @@ -107,6 +107,17 @@ of the cluster with Almanac. For details, see @{article:Cluster: Devices}. NOTE: Once you create a service, new repositories will immediately allocate on it. You may want to disable repository creation during initial setup. +NOTE: To create clustered services, your account must have the "Can Manage +Cluster Services" capability. By default, no accounts have this capability, +and you must enable it by changing the configuration of the Almanac +application. Navigate to the Alamanc application configuration as follows: +{nav icon=home, name=Home > +Applications > +Almanac > +Configure > +Edit Policies > +Can Manage Cluster Services } + Once the hosts are registered as devices, you can create a new service in Almanac: