Page MenuHomePhabricator

deployment-imagescaler0[12] puppet broken due to missing nginx lua support
Closed, ResolvedPublic


krenair@deployment-imagescaler02:~$ sudo /usr/sbin/nginx -g 'daemon on; master_process on;'
nginx: [emerg] unknown directive "lua_shared_dict" in /etc/nginx/sites-enabled/thumbor:1

Event Timeline

  • Installed libnginx-mod-http-lua
  • Manually installed /etc/nginx/prometheus.lua file to avoid puppet catch-22 (specifically, puppet will error out before creating that file due to nginx failing due to that file being missing), need to make the nginx service depend on that file somehow?
  • Killed existing deployment-imagescaler01 (was fine on -imagescaler02) nginx processes that were refusing to stop (preventing a restart due to port 8800 being in use)
  • Puppet now works

Need to puppetise the package installation and lua file dependency still.

Mentioned in SAL (#wikimedia-releng) [2017-08-31T23:32:12Z] <Krenair> fixed deployment-imagescaler0[12] puppet by installing a package and file manually, some puppetisation still needed -

I think the issue is simply that beta hasn't been configured to use the "extras" variant of nginx, like we did for prod:

But the thumbor nginx config uses the lua code regardless of which nginx version is present:

We should probably make the thumbor nginx config depend on the variant, to avoid future breakages like this, and simply configure beta to use the extras variant.

Gilles triaged this task as High priority.

Change 375772 had a related patch set uploaded (by Gilles; owner: Gilles):
[operations/puppet@production] Only uses lua in Thumbor Nginx config if "extras" variant

Tried to set nginx::extras in

But when running puppet:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 'variant' must be 'full', 'extras', or 'light' (got: 'extras'). at /etc/puppet/modules/nginx/manifests/init.pp:32 on node deployment-imagescaler02.deployment-prep.eqiad.wmflabs


Ah, my bad, I had written it as an array.

Change 375772 merged by Filippo Giunchedi:
[operations/puppet@production] Thumbor: only use lua in nginx config if "extras" variant