Libre completely broken...again

Sometime over the weekend, some update occurred that completely borked Libre.

In this case, running the validation script yields the following:

====================================
Component | Version
--------- | -------
LibreNMS  | 1.41-24-gad6ec7f
DB Schema | ?
PHP       | 7.0.28-0ubuntu0.16.04.1
MySQL     | ?
RRDTool   | 1.5.5
SNMP      | NET-SNMP 5.7.3
====================================

[FAIL]  Missing dependencies! [FIX] ./scripts/composer_wrapper.php install --no-dev
         symfony/dotenv
         symfony/polyfill-ctype
         myclabs/deep-copy
         wpb/string-blade-compiler
[FAIL]  Outdated dependencies [FIX] ./scripts/composer_wrapper.php install --no-dev
         amenadiel/jpgraph
         dapphp/radius
         easybook/geshi
         guzzlehttp/guzzle
         influxdb/influxdb-php
         symfony/polyfill-mbstring
         symfony/var-dumper
         symfony/debug
         symfony/console
         psy/psysh
          and 14 more...
[OK]    Composer Version: 1.6.5
[FAIL]  Missing dependencies!
        [FIX] composer install --no-dev
        Dependencies:
         symfony/dotenv
         symfony/polyfill-ctype
         myclabs/deep-copy
         wpb/string-blade-compiler

Needless to say, something has gone horribly wrong. I ran the suggested fixes…

> LibreNMS\ComposerHelper::preInstall
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 4 installs, 24 updates, 0 removals
  - Installing symfony/dotenv (v3.4.12): Downloading (100%)         
  - Updating amenadiel/jpgraph (3.6.14 => 3.6.20): Downloading (100%)         
  - Updating dapphp/radius (2.5.2 => 2.5.4): Downloading (100%)         
  - Updating easybook/geshi (v1.0.8.18 => v1.0.8.19): Downloading (100%)         
  - Updating guzzlehttp/guzzle (6.3.2 => 6.3.3): Downloading (100%)         
  - Updating influxdb/influxdb-php (1.14.5 => 1.14.7): Downloading (100%)         
  - Updating symfony/polyfill-mbstring (v1.7.0 => v1.8.0): Downloading (100%)         
  - Updating symfony/var-dumper (v3.4.8 => v3.4.12): Downloading (100%)         
  - Updating symfony/debug (v3.4.8 => v3.4.12): Downloading (100%)         
  - Updating symfony/console (v3.4.8 => v3.4.12): Downloading (100%)         
  - Updating psy/psysh (v0.8.18 => v0.9.6): Downloading (100%)         
  - Updating vlucas/phpdotenv (v2.4.0 => v2.5.0): Downloading (100%)         
  - Updating symfony/css-selector (v3.4.8 => v3.4.12): Downloading (100%)         
  - Updating symfony/process (v3.4.8 => v3.4.12): Downloading (100%)         
  - Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)         
  - Updating paragonie/random_compat (v2.0.12 => v2.0.17): Downloading (100%)         
  - Updating symfony/polyfill-php70 (v1.7.0 => v1.8.0): Downloading (100%)         
  - Updating symfony/http-foundation (v3.4.8 => v3.4.12): Downloading (100%)         
  - Updating symfony/event-dispatcher (v3.4.8 => v3.4.12): Loading from cache
  - Updating symfony/http-kernel (v3.4.8 => v3.4.12): Downloading (100%)         
  - Updating symfony/finder (v3.4.8 => v3.4.12): Downloading (100%)         
  - Updating nesbot/carbon (1.25.0 => 1.32.0): Downloading (100%)         
  - Updating league/flysystem (1.0.44 => 1.0.45): Downloading (100%)         
  - Updating laravel/tinker (v1.0.5 => v1.0.7): Downloading (100%)         
  - Updating symfony/yaml (v2.8.38 => v2.8.42): Downloading (100%)         
  - Installing myclabs/deep-copy (1.7.0): Downloading (100%)         
  - Installing wpb/string-blade-compiler (3.4.x-dev 30c974a): Cloning 30c974a305 from cache
  - Updating oriceon/toastr-5-laravel dev-master (4ce3779 => 8a03502):  Checking out 8a03502cc7
Generating autoload files
> LibreNMS\ComposerHelper::postInstall
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
Generating optimized class loader
The compiled services file has been removed.


root@thn-nms1:/opt/librenms# composer install --no-dev
> LibreNMS\ComposerHelper::preInstall
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files
> LibreNMS\ComposerHelper::postInstall
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
Generating optimized class loader
The compiled services file has been removed.

And everything was fine again.

The question is why does this keep happening? When an update is done, why is there a manual process to fix everything it’s broken? From an ongoing support/maintenance perspective, this doesn’t seem like a very good support model for an organization…where things keep breaking all the time.

This is not an organization. It’s a community project run by volunteers. Please stop treating it like someone is failing you.

5 Likes

You should expect many such occurrences since you’re probably on Rolling Branch.

Consider switching to a the stable https://docs.librenms.org/#General/Releases/#stable-branch if you’re so annoyed.

2 Likes

Nice justification. :roll_eyes:

@Atroskelis it would probably be good to have the specific release selection before the install procedure in the docs. Why would one install based on the dev branch, then switch. Why not install the correct branch from the get go?

Because we want people to help test things. This is documented and if you want stable switch to be stable branch.

2 Likes

I get it. That’s all well and good. In this context, the point is, given a top down approach to the documentation, it wouldn’t be a terrible idea to have that piece before the install procedure. Those that are leveraging the tool who aren’t sys admins by default, such as myself, would go through the doc to the point of “hey, it’s working” and leave it at that, not necessarily realizing that we’re on a not-so-stable branch and, and much like every long set of documentation, not continue to read on.

Far be it for me to not RTFM, but I’d think that selecting which branch after the fact is a bit counter productive.

It’s all happy on the stable release so AFAIC, this can be closed. Though still begs the question why the OP wouldn’t be addressed even in a dev release.

1 Like

You can edit the documentation so if you feel that they should and need to be improved then please do so.

3 Likes

For me the dependencies also failed over the weekend.

The GUI / web interface however still worked. Using only the GUI, I was not aware of that failure. No alerts or notifications in the GUI indicated that I was out of date for four days and had missing dependencies.

I sent a change to make it not fail so hard if the dependency was missing because apparently a lot of people have broken installs.

Reasons their installs are broken off the top of my head.

  1. ran commands as root breaking file permissions and preventing the updater from running correctly
  2. librenms user does not have proper web access to run composer (usually due to proxy)