Enabling nginx service breaks MAAS

Bug #1796224 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Andres Rodriguez

Bug Description

I wrote a test script which requires a tool not found in the archive. Because the machine being test doesn't have direct access to the Internet I enabled the nginx service(systemctl start nginx) on the region and placed the file my script needs in /var/www/html.

Testing starts and maas-run-remote-scripts is able to download the script tar and start running. However anything maas-run-remote-scripts POST results in a 500 error. /var/log/maas/http/error.log shows

2018/10/05 01:51:16 [crit] 12031#12031: *4756 open() "/var/lib/nginx/body/0000000140" failed (13: Permission denied), client: 10.245.136.26, server: , request: "POST /MAAS/metadata//2012-03-01/ HTTP/1.1", host: "10-245-136-0--21.maas-internal:5248"

Related branches

Lee Trager (ltrager)
description: updated
Lee Trager (ltrager)
description: updated
Revision history for this message
Lee Trager (ltrager) wrote :

Both nginx.service and maas-http.service are trying to use /var/lib/nginx/body/ at the same time. nginx.service is running as www-data:root while maas-http.service is running as nobody:root which where the permission error is coming from.

We need to ensure that maas-http.service does not use any resources nginix.service uses to make sure they do not overwrite eachother.

Changed in maas:
assignee: nobody → Andres Rodriguez (andreserl)
Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.5.0rc1 → 2.5.0beta3
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.