question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The GRR server's handling of misnamed config options needs to be more user friendly

See original GitHub issue

Currently, if an unrecognized config option is provided in the writeback file, restarting the GRR server components causes the writeback to be renamed by attaching a ‘.bak’ suffix. After this happens though, the server components cannot start, because the writeback is not initialized:

Traceback (most recent call last):
  File "/usr/share/grr-server/bin/grr_console", line 11, in <module>
    sys.exit(Console())
  File "/usr/share/grr-server/local/lib/python2.7/site-packages/grr_response_server/distro_entry.py", line 14, in Console
    flags.StartMain(console.main)
  File "/usr/share/grr-server/local/lib/python2.7/site-packages/grr_response_core/lib/flags.py", line 147, in StartMain
    main(sys.argv)
  File "/usr/share/grr-server/local/lib/python2.7/site-packages/grr_response_server/bin/console.py", line 107, in main
    server_startup.Init()
  File "/usr/share/grr-server/local/lib/python2.7/site-packages/grr_response_server/server_startup.py", line 88, in Init
    raise RuntimeError("Config not initialized, run \"grr_config_updater"
RuntimeError: Config not initialized, run "grr_config_updater initialize". If the server is already configured, add "Server.initialized: True" to your config.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mbushkovcommented, Jul 10, 2020

@panhania - it’s a valid point. However, this flag has a default true value for server components and a default false value for the client component. If allow_missing_config_definitions flag is introduced, you’ll end up in the opposite situation: it will have to default to True on the clients and to False on the server components. While this would be an improvement, I’m not sure it’s worth it, given that it’s one of the rare command line flags that’s actually widely used (because of how Docker and GRR service files are written) - so the change would either require everybody to migrate or us to support both flags at the same time for a while.

At the very least I’d keep 2 issues separate: renaming the flag and ensuring the reasonable default behavior on server/client components.

0reactions
panhaniacommented, Jul 10, 2020

Since negative flags with true value as default are counter-intuitive (at least for me), I would also suggest renaming the flag to --allow_missing_config_definitions and reverse the behaviour.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions - GRR documentation
I heard GRR was designed for Bigtable and now Google has a Cloud Bigtable service. Can I use it? What operating system versions...
Read more >
google/grr - Gitter
I tried to install the GRR server using Nginx. It is installed and shows the status active but I am not able to...
Read more >
Agents - Configuration File Reference | Consul
Use agent configuration files to assign attributes to agents and configure ... to be set which can configure operator-friendly settings for Consul servers....
Read more >
Renaming a GRR Server & Client Configuration
Renaming the Server & Updating the Clients Rather than rebuilding a new ... the public and private keys are the settings you need...
Read more >
Integrating GRR - Google Groups
It's not too difficult, however, there are some modifications to be made in regard to the web administration (web server settings), how the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found