mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #427 from holta/master
bypass MongoDB; forcibly remove MongoDB's 256MB prealloc files
This commit is contained in:
commit
4b31d0edf3
4 changed files with 22 additions and 9 deletions
|
@ -60,11 +60,12 @@
|
|||
# we decided to enable mysql unconditionally
|
||||
# when: elgg_enabled or rachel_enabled or owncloud_enabled or phpmyadmin_enabled or wordpress_enabled or iiab_menu_install
|
||||
|
||||
- name: Turn on mongodb if sugarizer enabled
|
||||
set_fact:
|
||||
mongodb_install: True
|
||||
mongodb_enabled: True
|
||||
when: sugarizer_enabled
|
||||
# Commenting out MongoDB on a trial basis, for a more basic/lightweight Sugarizer, per https://github.com/iiab/iiab/pull/427
|
||||
# - name: Turn on mongodb if sugarizer enabled
|
||||
# set_fact:
|
||||
# mongodb_install: True
|
||||
# mongodb_enabled: True
|
||||
# when: sugarizer_enabled
|
||||
|
||||
# There might be other db's
|
||||
- name: Turn on postgresql if moodle or pathagar enabled
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
- { path: '/library/dbdata/mongodb' }
|
||||
- { path: '/var/log/mongodb' }
|
||||
|
||||
|
||||
- name: Create systemd files
|
||||
template: src={{ item.src }}
|
||||
dest={{ item.dest }}
|
||||
|
@ -38,7 +37,6 @@
|
|||
- { name: mongodb }
|
||||
when: mongodb_enabled
|
||||
|
||||
|
||||
- name: disable services
|
||||
service: name={{ item.name }}
|
||||
enabled=no
|
||||
|
@ -47,6 +45,20 @@
|
|||
- { name: mongodb }
|
||||
when: not mongodb_enabled
|
||||
|
||||
# See https://github.com/iiab/iiab/issues/254 for other attempts to eliminate
|
||||
# these 256MB files. Brute Force Idea: rm /var/lib/mongodb/journal/prealloc.*
|
||||
- name: find /var/lib/mongodb/prealloc.* files to delete
|
||||
find:
|
||||
paths: /var/lib/mongodb/journal
|
||||
patterns: prealloc.*
|
||||
register: files_to_delete
|
||||
|
||||
- name: delete prealloc files
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
with_items: "{{ files_to_delete.files }}"
|
||||
|
||||
- name: add mongodb to service list
|
||||
ini_file: dest='{{ service_filelist }}'
|
||||
section=mongodb
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
dependencies:
|
||||
- { role: mongodb, tags: ['generic','mongodb'], when: sugarizer_install }
|
||||
# - { role: mongodb, tags: ['generic','mongodb'], when: sugarizer_install }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[unit]
|
||||
Description=Node.js Sugarizer Server
|
||||
Requires=After=mongodb.service # Requires the mongodb service to run first
|
||||
# Requires=After=mongodb.service # Requires the mongodb service to run first
|
||||
|
||||
[Service]
|
||||
WorkingDirectory={{ sugarizer_location }}/sugarizer/server/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue