alces-software / gridware

tool for compilation and installation of applications and libraries from the Alces Gridware software library
0 stars 0 forks source link

Error installing depot #4

Open bobwhitelock opened 7 years ago

bobwhitelock commented 7 years ago

From @vlj91 on September 30, 2016 11:55

Received the following error whilst (re)installing a depot:

[alces@login1(el-testo) ~]$ alces gridware depot install benchmark
Installing depot: benchmark

 > Initializing depot: benchmark
      Initialize ... OK

Importing mpi-openmpi-1.8.5-el7.tar.gz

 > Fetching archive
        Download ... SKIP (Existing source file detected)

 > Preparing import
         Extract ... OK
          Verify ... OK

 > Processing mpi/openmpi/1.8.5/gcc-4.8.5
       Preparing ... OK
       Importing ... OK
     Permissions ... OK

 > Finalizing import
          Update ... OK
    Dependencies ... OK

Importing libs-atlas-3.10.2-el7.tar.gz

 > Fetching archive
        Download ... SKIP (Existing source file detected)

 > Preparing import
         Extract ... OK
          Verify ... OK

 > Processing libs/atlas/3.10.2/gcc-4.8.5
       Preparing ... OK
       Importing ... error: database is locked (code: 5, sql state: , query: INSERT INTO "alces_packager_packages" ("type", "name", "version", "tag", "compiler_tag", "path", "default") VALUES ('libs', 'atlas', '3.10.2', 'gcc-4.8.5', 'gcc-4.8.5', 'libs/atlas/3.10.2/gcc-4.8.5', 't'), uri: sqlite3:/opt/gridware/depots/8f2a570b/el7/etc/package.db?scheme=sqlite&user=&password=&host=&port=&query=&fragment=&adapter=sqlite3&path=/opt/gridware/depots/8f2a570b/el7/etc/package.db). Use --trace to view backtrace

With --trace on (it happened the second time round trying to install as well):

       Importing ... /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:114:in `execute_non_query': database is locked (DataObjects::ConnectionError)
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:114:in `block (2 levels) in create'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:276:in `with_connection'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:113:in `block in create'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:85:in `each'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:85:in `create'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/repository.rb:146:in `create'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource/persistence_state/transient.rb:74:in `create_resource'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource/persistence_state/transient.rb:25:in `commit'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:963:in `_persist'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:977:in `block in create_with_hooks'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:974:in `catch'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:974:in `create_with_hooks'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:1028:in `save_self'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:1013:in `block in _save'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:1229:in `run_once'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:1012:in `_save'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/resource.rb:412:in `save'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/model.rb:718:in `_create'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/model.rb:458:in `create'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/model.rb:445:in `first_or_create'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:193:in `block (3 levels) in import_package'
        from /opt/clusterware/lib/ruby/lib/alces/packager/io_handler.rb:145:in `call'
        from /opt/clusterware/lib/ruby/lib/alces/packager/io_handler.rb:145:in `with_spinner'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:41:in `with_spinner'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:177:in `block (2 levels) in import_package'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:139:in `catch'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:139:in `block in import_package'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:138:in `each'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:138:in `import_package'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:97:in `block in import'
        from /opt/clusterware/opt/ruby/lib/ruby/2.2.0/tmpdir.rb:88:in `mktmpdir'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:75:in `import'
        from /opt/clusterware/lib/ruby/lib/alces/packager/archive_importer.rb:33:in `import'
        from /opt/clusterware/lib/ruby/lib/alces/packager/depot_handler.rb:260:in `block (2 levels) in install'
        from /opt/clusterware/lib/ruby/lib/alces/packager/depot_handler.rb:256:in `each'
        from /opt/clusterware/lib/ruby/lib/alces/packager/depot_handler.rb:256:in `block in install'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core.rb:263:in `block in repository'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core/repository.rb:114:in `scope'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/dm-core-1.2.1/lib/dm-core.rb:263:in `repository'
        from /opt/clusterware/lib/ruby/lib/alces/packager/depot_handler.rb:254:in `install'
        from /opt/clusterware/lib/ruby/lib/alces/packager/depot_handler.rb:52:in `block in handle'
        from /opt/clusterware/lib/ruby/lib/alces/packager/depot_handler.rb:42:in `each'
        from /opt/clusterware/lib/ruby/lib/alces/packager/depot_handler.rb:42:in `handle'
        from /opt/clusterware/lib/ruby/lib/alces/packager/handler.rb:151:in `depot'
        from /opt/clusterware/lib/ruby/lib/alces/packager/handler.rb:80:in `block in handle_action'
        from /opt/clusterware/opt/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:245:in `block in with_clean_env'
        from /opt/clusterware/opt/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:232:in `with_original_env'
        from /opt/clusterware/opt/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:238:in `with_clean_env'
        from /opt/clusterware/lib/ruby/lib/alces/packager/handler.rb:75:in `handle_action'
        from /opt/clusterware/lib/ruby/lib/alces/packager/handler.rb:60:in `method_missing'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:179:in `call'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/commander-4.3.5/lib/commander/runner.rb:68:in `run!'
        from /opt/clusterware/lib/ruby/vendor/ruby/2.2.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
        from /opt/clusterware/libexec/actions/gridware:76:in `<main>'

Steps performed:

Copied from original issue: alces-software/clusterware#213

bobwhitelock commented 7 years ago

@mjtko - I see you've been assigned to this, have you started investigating it at all?

bobwhitelock commented 7 years ago

From @mjtko on October 17, 2016 10:39

Nope, @vlj91 just auto-assigns me. :-)

bobwhitelock commented 7 years ago

OK! :)

bobwhitelock commented 7 years ago

I've not been able to reproduce this locally on develop or on AWS using the 2016.3rc2 template (https://github.com/alces-software/flight-appliance-templates/blob/2016.3rc6/compute/aws/marketplace-solo-professional.json), which @vlj91 said is the same as the one which originally produced it. Seems to rely on something else in the environment or only occurs inconsistently, but does seem to be an issue with database access failing sometimes.

For future reference the command @vlj91 said produced this issue is this:

depots=$(alces gridware depot list -1); for depot in ${depots[@]}; do alces gridware depot install $depot; done; for depot in ${depots[@]}; do alces gridware --yes depot purge $depot; done; alces gridware depot install benchmark``