Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double reserve disk to 2%; act on admin_console_install and _enabled #151

Merged
merged 2 commits into from
Oct 3, 2020

Conversation

holta
Copy link
Member

@holta holta commented Oct 3, 2020

  1. Doubles the reserve disk space from 1% to 2% [*] to extend the life of microSD cards, particularly now that large capacity cards are so much cheaper since ~2019.

    [*] tune2fs default is 5%. IIAB has defaulted to 1% since Aug 2017 for field communities tying to eke out every last gigabyte for content.

  2. admin_console_install and admin_console_enabled variables (that were set up about a year ago) are now finally acted upon.

Tested on Debian 10.6

Ref: PR #104 "tune2fs: lower reserve disk space to 1% if microSD /dev/mmcblk0p2 detected"

@holta
Copy link
Member Author

holta commented Oct 3, 2020

systemd's enabling/disabling and starting/stopping of iiab-cmdsrv.service can be enhanced and/or supplemented with NGINX logic later, as necessary.

@holta
Copy link
Member Author

holta commented Oct 5, 2020

  1. anyone with admin console already installed will never get updates

This PR doesn't affect whether or not Admin Console gets updates.

I suspect @tim-moody is talking about /etc/iiab/install-flags/iiab-admin-console-complete that @jvonau implemented around early 2020.

Which is indeed an interesting question.

My opinion is that 'sudo iiab' wasn't intended to be run after initial install of IIAB, so the behavior that @jvonau proposed and was implemented then ( i.e. around early 2020, the various install flags placed in /etc/iiab/install-flags/ ) seemed fair...or at least seemed good enough.

  1. there will be contention in that anyone running iiab-admin-console/install will turn cmdsrv back on and then iiab-install will turn it off again

I haven't seen any enabling/disabling contention during my many tests.

But will help fixing them if they exist, if others can help shed light?

(Just as an aside, I don't expect many will want to disable Admin Console. A number even far fewer than those who won't want to install Admin Console.)

  1. local vars was not intended to be used outside of ansible.

Best of intentions yes: thanks to David Farning's dedication and others who've put their lives into trying to eke the most out of Ansible, for sure.

But after 7 years Ansible remains a "pig" and as such there are a number of cases like firmware, openvpn (and possibly network?) where avoiding Ansible became increasingly necessary — as judiciously as possible and while respecting the implementer's wishes in /etc/iiab/local_vars.yml

  1. the comment that admin console installs js-menu is not entirely accurate as there is a js-menu_install variable that controls whether js-menu is installed or not.

Good to know.

Where is that comment? (Are you talking about the following comment from a couple years ago?)

https://github.com/iiab/iiab/blob/master/vars/default_vars.yml#L75-L77

@holta
Copy link
Member Author

holta commented Oct 5, 2020

/etc/iiab/install-flags/iiab-admin-console-complete that @jvonau implemented around early 2020.

CLARIF, it was a bit earlier than I remembered — @jvonau's commit was from over a year ago here: 60f6dec

@jvonau
Copy link
Contributor

jvonau commented Oct 5, 2020

There are a number of problems with this PR:

1. anyone with admin console already installed will never get updates

Nor iiab by design, it's an installer script, you have to have some sort of finish line to cross and an auto reboot at the end is not enough info on if it was successful or not.

2. there will be contention in that anyone running iiab-admin-console/install will turn cmdsrv back on and then iiab-install will turn it off again

Sorry iiab-install and thus iiab (the repo) doesn't contain any cmdsrv logic, if you are suggesting 'iiab' (the script) has that behavior I would agree. Think the main aim is(no clue this caught me by off guard also):

  1. Turn off the installation of admin console all together
    Using some feedback from Who can help test IIAB 7.2 on Ubuntu 20.04+, Debian 10.10+, Linux Mint 20 & Raspberry Pi ? [Kolibri 502 Bad Gateway?] iiab#1737 as a deployment example I could see a wish to exclude the console if the intent is to deploy a single CMS as the flagship for that deployment. I'd change the iiab_home_url to point to the single CMS and omit admin-console using 'the do it by hand approach', is looks to be a better defined extension of that train of thought.

  2. To be able to turn cmdsrv off post content curation/pre-deployment image creation by editing *_enabled local_vars.yml and running 'sudo iiab' if place of doing sudo systemctl disable iiab-cmdsrv

The flaw I see is there no user input validation once iiab-install completes, think that can be addressed with check-vars from iiab/iiab#2539 called from sudo iiab

3. local vars was not intended to be used outside of ansible.

I was assuming that admin-console was always installed, but there were on and off issues with ka-lite portion of the install later on, the flags help to recover the install faster without repeating all the steps.

What is the alternative with the split git repos then? Have admin_console exit if local_vars.yml has install false?

/etc/iiab/install-flags/iiab-admin-console-complete that @jvonau implemented around early 2020.

CLARIF, it was a bit earlier than I remembered — @jvonau's commit was from over a year ago here: 60f6dec

The lineage of PRs start Jul 25, 2018 #33,with #73 #77 #78 #79 being updates revisions

@tim-moody
Copy link
Contributor

Another useless argument. nolo contendere

@jvonau
Copy link
Contributor

jvonau commented Oct 6, 2020

Just so I fully understand,the issues
1 PR pushed without advanced warning
2 there was an objection to this PR raised,
3 question was asked to shed some light
4 validation point raised
5 question was asked for an alternative
Thought there was a "what can be better" discussion starting, but I guess I was mistaken.

@tim-moody
Copy link
Contributor

don't think we're converging on anything useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants