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

feat: add support for Ubuntu24 for mongo 7.0 #52

Merged
merged 13 commits into from
Oct 7, 2024
Merged

Conversation

Henrrypg
Copy link
Contributor

@Henrrypg Henrrypg commented Oct 2, 2024

Descripcion

This PR adds support to Ubuntu24.04 for Mongo.

There are several changes to describe:

  1. These changes not alllow to support Ubuntu22.04 and Ubuntu24.04 due to --break-system-packages option does not exists in Jammy release.
  2. Mongo 7.0 does not have official support to Ubuntu24.04. We're installing Jammy release of mongo 7.
  3. In EC2 ubuntu24.04 image is not necessary to install cron and restart mongo service once installed. But molecule image is failling. That's why we're adding restart tasks and cron installation, it should not affect the run in a normal VM.
  4. Idempotency is failling in the task: Install mongo and recommends. We're forcing the installation and when the force flag is not set, we're getting this error:
failed: [mongo-7-0-ubuntu2404] (item=mongodb-org-server=7.0.8) => {"ansible_loop_var": "item", "cache_update_time": 1728055818, "cache_updated": false, "changed": false, "item": "mongodb-org-server=7.0.8", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"       install 'mongodb-org-server=7.0.8' -o APT::Install-Recommends=yes' failed: E: Packages were downgraded and -y was used without --allow-downgrades.\n", "rc": 100, "stderr": "E: Packages were downgraded and -y was used without --allow-downgrades.\n", "stderr_lines": ["E: Packages were downgraded and -y was used without --allow-downgrades."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages will be DOWNGRADED:\n  mongodb-org-server\n0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 3 not upgraded.\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages will be DOWNGRADED:", "  mongodb-org-server", "0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 3 not upgraded."]}
failed: [mongo-7-0-ubuntu2404] (item=mongodb-org-shell=7.0.8) => {"ansible_loop_var": "item", "cache_update_time": 1728055818, "cache_updated": false, "changed": false, "item": "mongodb-org-shell=7.0.8", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"       install 'mongodb-org-shell=7.0.8' -o APT::Install-Recommends=yes' failed: E: Packages were downgraded and -y was used without --allow-downgrades.\n", "rc": 100, "stderr": "E: Packages were downgraded and -y was used without --allow-downgrades.\n", "stderr_lines": ["E: Packages were downgraded and -y was used without --allow-downgrades."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages will be DOWNGRADED:\n  mongodb-org-shell\n0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 3 not upgraded.\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages will be DOWNGRADED:", "  mongodb-org-shell", "0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 3 not upgraded."]}
failed: [mongo-7-0-ubuntu2404] (item=mongodb-org-mongos=7.0.8) => {"ansible_loop_var": "item", "cache_update_time": 1728055818, "cache_updated": false, "changed": false, "item": "mongodb-org-mongos=7.0.8", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"       install 'mongodb-org-mongos=7.0.8' -o APT::Install-Recommends=yes' failed: E: Packages were downgraded and -y was used without --allow-downgrades.\n", "rc": 100, "stderr": "E: Packages were downgraded and -y was used without --allow-downgrades.\n", "stderr_lines": ["E: Packages were downgraded and -y was used without --allow-downgrades."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages will be DOWNGRADED:\n  mongodb-org-mongos\n0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 3 not upgraded.\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages will be DOWNGRADED:", "  mongodb-org-mongos", "0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 3 not upgraded."]}
failed: [mongo-7-0-ubuntu2404] (item=mongodb-org-tools=7.0.8) => {"ansible_loop_var": "item", "cache_update_time": 1728055818, "cache_updated": false, "changed": false, "item": "mongodb-org-tools=7.0.8", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"       install 'mongodb-org-tools=7.0.8' -o APT::Install-Recommends=yes' failed: E: Packages were downgraded and -y was used without --allow-downgrades.\n", "rc": 100, "stderr": "E: Packages were downgraded and -y was used without --allow-downgrades.\n", "stderr_lines": ["E: Packages were downgraded and -y was used without --allow-downgrades."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n  mongodb-org\nThe following packages will be upgraded:\n  mongodb-org\nThe following packages will be DOWNGRADED:\n  mongodb-org-tools\n1 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 2 not upgraded.\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", "  mongodb-org", "The following packages will be upgraded:", "  mongodb-org", "The following packages will be DOWNGRADED:", "  mongodb-org-tools", "1 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 2 not upgraded."]}

@Henrrypg Henrrypg force-pushed the hpg/ubuntu24-mongo branch 3 times, most recently from b71d157 to 6901d51 Compare October 3, 2024 16:21
@Henrrypg Henrrypg changed the title Hpg/ubuntu24 mongo feat: add support for Ubuntu24 for mongo 7.0 Oct 4, 2024
@Henrrypg Henrrypg marked this pull request as ready for review October 4, 2024 16:10
@Henrrypg Henrrypg requested a review from a team as a code owner October 4, 2024 16:10
README.md Outdated Show resolved Hide resolved
@Henrrypg Henrrypg merged commit 826f088 into main Oct 7, 2024
4 checks passed
@Henrrypg Henrrypg deleted the hpg/ubuntu24-mongo branch October 7, 2024 21:39
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.

3 participants