Skip to content

Commit

Permalink
Merge pull request #2644 from wazuh/bugfix/2640-manager-restart
Browse files Browse the repository at this point in the history
Removed the delay parameter from the restart request
  • Loading branch information
jsanchez91 committed Nov 19, 2020
2 parents 16358cc + 29a1027 commit b707f44
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ All notable changes to the Wazuh app project will be documented in this file.

### Fixed

- Manager restart in rule editor does not work with Wazuh cluster enabled [#2640](https://github.com/wazuh/wazuh-kibana-app/issues/2640)
- Restore the tables in the agents' reports [#2628](https://github.com/wazuh/wazuh-kibana-app/issues/2628)
- [RBAC] Issues detected when using RBAC [#2579](https://github.com/wazuh/wazuh-kibana-app/issues/2579)
- Changes done via a worker's API are overwritten [#2626](https://github.com/wazuh/wazuh-kibana-app/issues/2626)

### Fixed

- [BUGFIX] Default user field for current platform [#2633](https://github.com/wazuh/wazuh-kibana-app/pull/2633)

## Wazuh v4.0.1 - Kibana v7.9.1, v7.9.3 - Revision 4009
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,7 @@ export const restartCluster = async () => {
throw new Error(str);
}
// this.performClusterRestart(); // TODO: convert AngularJS to React
await WzRequest.apiReq('PUT', `/cluster/restart`, {
delay: 15000
});
await WzRequest.apiReq('PUT', `/cluster/restart`, {});
// this.$rootScope.$broadcast('removeRestarting', {}); TODO: isRestarting: false?
return {
data: {
Expand Down Expand Up @@ -508,7 +506,7 @@ export const checkCurrentSecurityPlatform = async () => {
'/elastic/security/current-platform',
{}
);
const platform = (result.data || {}).platform || 'elastic';
const platform = (result.data || {}).platform || 'elastic';

return platform;
} catch (error) {
Expand All @@ -524,7 +522,7 @@ export const restartClusterOrManager = async (updateWazuhNotReadyYet) => {
const clusterStatus = (((await clusterReq()) || {}).data || {}).data || {};
const isCluster =
clusterStatus.enabled === 'yes' && clusterStatus.running === 'yes';

isCluster ? await restartCluster() : await restartManager();
// Dispatch a Redux action
updateWazuhNotReadyYet(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default class StatusHandler {
const str = data.details.join();
throw new Error(str);
}
await WzRequest.apiReq('PUT', `/cluster/restart`, { delay: 15000 });
await WzRequest.apiReq('PUT', `/cluster/restart`, { });
return { data: { data: 'Restarting cluster' } };
} catch (error) {
return Promise.reject(error);
Expand Down
2 changes: 1 addition & 1 deletion public/services/config-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class ConfigHandler {

async performClusterRestart() {
try {
await WzRequest.apiReq('PUT', `/cluster/restart`, { delay: 15000 });
await WzRequest.apiReq('PUT', `/cluster/restart`, {});
this.$rootScope.$broadcast('removeRestarting', {});
} catch (error) {
this.$rootScope.$broadcast('removeRestarting', {});
Expand Down

0 comments on commit b707f44

Please sign in to comment.