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

Bump Ansible from 2.10 to 3.0 #974

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

mkllnk
Copy link
Member

@mkllnk mkllnk commented Jan 3, 2025

After version 2.10 the ansible-core package continues with 2.11 but the ansible community package jumps to version 3.0.0. This doesn't upgrade ansible-core which stays on 2.10.

Tests:

  • Setup virtual machine locally
  • Setup CI machine
  • Deploy to staging
  • Provision staging

Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Great, one step forward!

I don't currently have a vagrant vm on my machine (I had to clear space for testing Docker), so won't test it today.
But if nobody else does either I'm happy to pick it up and test it tomorrow.

@rioug
Copy link
Contributor

rioug commented Jan 6, 2025

I'll give this a go, I think I still have vagrant set up on my machine

@rioug
Copy link
Contributor

rioug commented Jan 6, 2025

My first run of ansible-playbook site.yml --limit vagrant failed with the error below, but I think it was just a network error :

TASK [oefenweb.swapfile : install dependencies] **********************************************************************************************************************************************************************************************
failed: [local_vagrant] (item=['util-linux']) => {
    "ansible_loop_var": "item",
    "changed": false,
    "item": [
        "util-linux"
    ]
}

MSG:

Failed to update apt cache: unknown reason

My second try failed while installing bundler :

TASK [deploy : install bundler] **************************************************************************************************************************************************************************************************************
fatal: [local_vagrant]: FAILED! => {
   "changed": false,
   "cmd": [
       "bash",
       "-lc",
       "./script/install-bundler"
   ],
   "delta": "0:00:00.340266",
   "end": "2025-01-06 02:55:49.025580",
   "rc": 1,
   "start": "2025-01-06 02:55:48.685314"
}

STDERR:

/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_VERSION
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_LIBRARY_VERSION
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_VERSION_NUMBER
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_FIPS
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::BN::CONSTTIME
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::Config::DEFAULT_CONFIG_FILE
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_VERSION
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_LIBRARY_VERSION
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_VERSION_NUMBER
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_FIPS
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::BN::CONSTTIME
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::Config::DEFAULT_CONFIG_FILE
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_VERSION
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_LIBRARY_VERSION
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_VERSION_NUMBER
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::OPENSSL_FIPS
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::BN::CONSTTIME
/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/x86_64-linux/openssl.so: warning: already initialized constant OpenSSL::Config::DEFAULT_CONFIG_FILE
ERROR:  Loading command: install (LoadError)
   /lib/x86_64-linux-gnu/libjemalloc.so.2: cannot allocate memory in static TLS block - /home/openfoodnetwork/.gem/ruby/3.1.0/gems/digest-3.1.1/lib/digest.so
   <internal:/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
   <internal:/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
   /home/openfoodnetwork/.gem/ruby/3.1.0/gems/digest-3.1.1/lib/digest/loader.rb:3:in `<top (required)>'
   <internal:/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
   <internal:/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
   /home/openfoodnetwork/.gem/ruby/3.1.0/gems/digest-3.1.1/lib/digest.rb:16:in `<top (required)>'
   <internal:/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
   <internal:/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/security.rb:476:in `<module:Security>'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/security.rb:327:in `<top (required)>'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/package.rb:8:in `require_relative'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/package.rb:8:in `<top (required)>'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/dependency_installer.rb:4:in `require_relative'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/dependency_installer.rb:4:in `<top (required)>'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/commands/install_command.rb:4:in `require_relative'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/commands/install_command.rb:4:in `<top (required)>'
   <internal:/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
   <internal:/home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/command_manager.rb:228:in `load_and_instantiate'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/command_manager.rb:135:in `[]'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/command_manager.rb:201:in `find_command'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/command_manager.rb:183:in `process_args'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/command_manager.rb:149:in `run'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/gem_runner.rb:51:in `run'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/bin/gem:21:in `<main>'
ERROR:  While executing gem ... (NoMethodError)
   undefined method `deprecated?' for nil:NilClass

     cmd.deprecation_warning if cmd.deprecated?
                                   ^^^^^^^^^^^^
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/command_manager.rb:184:in `process_args'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/command_manager.rb:149:in `run'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/lib/ruby/3.1.0/rubygems/gem_runner.rb:51:in `run'
   /home/openfoodnetwork/.rbenv/versions/3.1.4/bin/gem:21:in `<main>'


MSG:

non-zero return code

I am not sure what to do here, I tried running the install-bundler manually in the VM and no error there. I double the ram and as far as I can tell there is plenty of disk space. But I might be looking at the wrong thing ?

Any pointer ?

@rioug
Copy link
Contributor

rioug commented Jan 6, 2025

I somehow broke my VM so I decided to remove it and start from scratch, this time everything ran without any issue :

  • ansible-playbook site.yml --limit vagrant 🟢
  • ansible-playbook playbooks/deploy.yml --limit vagrant -e "git_version=v5.0.9" 🟢

So I believe we are ready to merge !

@mkllnk mkllnk merged commit 0b02652 into openfoodfoundation:master Jan 6, 2025
1 check passed
@mkllnk mkllnk deleted the python-3.10-ansible-3 branch January 6, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants