wazuh-docker icon indicating copy to clipboard operation
wazuh-docker copied to clipboard

Volume naming breaks migration

Open elwali10 opened this issue 2 years ago • 2 comments

Hello team,

It would be great to have a consistent naming convention for the volumes and avoid breaking the migration processes. An example:

  • https://github.com/wazuh/wazuh-docker/blob/v4.2.5/production-cluster.yml#L24-L34 - ossec_api_configuration:/var/ossec/api/configuration
  • https://github.com/wazuh/wazuh-docker/blob/v4.2.5/docker-compose.yml#L20-L30 - ossec-api-configuration:/var/ossec/api/configuration

If a user used the above docker-compose.yml (more common) and migrated the data using https://github.com/wazuh/wazuh-docker/blob/master/multi-node/volume-migrator.sh, the process would fail due to the naming difference.

Regards, Elwali

elwali10 avatar Jul 18 '22 06:07 elwali10

This is related to https://github.com/wazuh/wazuh/issues/9175

havidarou avatar Jul 20 '22 16:07 havidarou

The previous nomenclature separated two environments (4.2.x version):

  • production-cluster.yml which displayed a production environment with cluster included and persistence in all necessary directories.
  • docker-compose.yml which contains an example deployment, had persistence in Wazuh manager directories but no persistence in opendistro data and no clustering of services.

With release 4.3.x the uses of the environments were modified, the single-node environment which does not have a cluster but does have persistence, and the multi-node environment, which has persistence and clustering, equivalent to the environment created by the production script -cluster.yml from 4.2.x.

At the time of creating the migration script, the productive environment of 4.2.x was taken into account, which had cluster and persistence and for this reason the script is found in the path of the multi-node deployment of 4.3.x. The environment deployed by the docker-compose.yml script was not taken into account because it was a test deployment, as indicated in the documentation. https://documentation.wazuh.com/4.2/docker/wazuh-container.html#demo-deployment

If necessary, a migration script could be created for a test environment to a single-node environment, but if they have added persistence on the user side, we could not contemplate it.

vcerenu avatar Aug 11 '22 19:08 vcerenu

This is no longer needed.

teddytpc1 avatar May 07 '24 13:05 teddytpc1