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

Update docs on increasing the persistent log sizes #2263

Merged
1 commit merged into from
May 18, 2022
Merged

Conversation

lmbarros
Copy link
Contributor

No description provided.

@lmbarros lmbarros self-assigned this Apr 26, 2022
@vipulgupta2048
Copy link
Member

Hey @lmbarros not to put too much on your plate since you are looking to persistent logging maybe answers to these questions by Zoobot would be great to be documented

@vipulgupta2048
Copy link
Member

vipulgupta2048 commented May 10, 2022

@lmbarros Repinging for about finishing this. Let me know if you need help.

@lmbarros
Copy link
Contributor Author

@vipulgupta2048 What are the Zoobot's questions you mentioned?

The current status here is that I am getting errors when following the instructions on README to test and rebuild the docs after my changes.

After a successful npm install, npm starts errors with this:

> [email protected] start /home/lmb/balena/balena-io/docs
> node index.js

internal/modules/cjs/loader.js:983
  throw err;
  ^

Error: Cannot find module './nav.json'
Require stack:
- /home/lmb/balena/balena-io/docs/server/index.coffee
- /home/lmb/balena/balena-io/docs/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1042:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/lmb/balena/balena-io/docs/server/index.coffee:5:14)
    at Object.<anonymous> (/home/lmb/balena/balena-io/docs/server/index.coffee:1:1)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.loadFile (/home/lmb/balena/balena-io/docs/node_modules/coffeescript/lib/coffeescript/register.js:18:19)
    at Module.load (/home/lmb/balena/balena-io/docs/node_modules/coffeescript/lib/coffeescript/register.js:53:36)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1042:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/lmb/balena/balena-io/docs/index.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47
 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/lmb/balena/balena-io/docs/server/index.coffee',
    '/home/lmb/balena/balena-io/docs/index.js'
  ]
}

And npm run build:fast gives me this:

> [email protected] build:fast /home/lmb/balena/balena-io/docs
> ./tools/build.sh && webpack --mode production

Building HTML...
(node:77181) UnhandledPromiseRejectionWarning: Error: Invalid frontmatter in the file at: /home/lmb/balena/balena-io/docs/pages/reference/base-images/base-images.md
    at Metalsmith.<anonymous> (/home/lmb/balena/balena-io/docs/node_modules/metalsmith/lib/index.js:462:21)
    at Generator.next (<anonymous>:null:null)
    at Metalsmith.next (/home/lmb/balena/balena-io/docs/node_modules/co/index.js:74:21)
    at /home/lmb/balena/balena-io/docs/node_modules/co/index.js:93:18
    at /home/lmb/balena/balena-io/docs/node_modules/thunkify-wrap/index.js:96:12
    at /home/lmb/balena/balena-io/docs/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)

@vipulgupta2048
Copy link
Member

@lmbarros Check out #2267, forgot to mention it in my original message.
Also, please rebase your branch to fix the issue that you are seeing. I fixed the frontmatter issue with #2266

Signed-off-by: Leandro Motta Barros <[email protected]>
Change-type: patch
@lmbarros lmbarros marked this pull request as ready for review May 18, 2022 18:16
@lmbarros
Copy link
Contributor Author

Thanks, @vipulgupta2048 ! Ready for review! I didn't take into account Zoobot's questions (have higher-prio tasks now), but I think this PR is an improvement over the current docs nevertheless.

Copy link
Member

@vipulgupta2048 vipulgupta2048 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lmbarros for your contribution!

@ghost ghost merged commit 94455eb into master May 18, 2022
@ghost ghost deleted the lmb/persistent-logging branch May 18, 2022 19:36
@Maher4Ever
Copy link

@vipulgupta2048 Would you mind elaborating on why the steps for increasing the size of persistent logs should only work on development images? I tested these steps today on a production image and they seem to work.

@vipulgupta2048
Copy link
Member

Hello @Maher4Ever Looking back on this change, it seemed @lmbarros might have tested it on development/production and found something. So pinging to see if he knows something.

I was under the impression changing the setting should work in any environment. Since you have tested it and if you can then please do open a PR to rectify this.

@lmbarros
Copy link
Contributor Author

Hi @Maher4Ever ! As far as I know it should technically work in production mode, too. It's just that we currently don't offer a simple and safe way to change this config, and we generally recommend against manual config modifications to production devices (because mistakes can cause hard-to-solve problems).

This pull request was closed.
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