From c6745148cd7e65e7daed71d44ba66c6b335f97b2 Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Wed, 29 Nov 2023 16:00:09 -0500 Subject: [PATCH 1/3] Basic reformatting Signed-off-by: Ian Maddaus --- content/api_omnitruck.md | 12 +-- content/cookbook_versioning.md | 2 +- content/ctl_chef_client.md | 2 +- content/data_bags.md | 6 +- content/debug.md | 2 +- content/deprecations_chef_platform_methods.md | 2 +- content/errors.md | 90 +++++++++---------- content/recipes.md | 2 +- content/release_notes_chefdk.md | 14 +-- .../md/chef_repo_many_users_same_knife.md | 2 +- content/reusable/md/cookbooks_recipe_tags.md | 2 +- ...l_chef_client_windows_as_scheduled_task.md | 2 +- .../md/packages_install_script_examples.md | 2 +- .../md/packages_install_script_run_windows.md | 2 +- content/reusable/md/search_key_nested.md | 12 +-- 15 files changed, 77 insertions(+), 77 deletions(-) diff --git a/content/api_omnitruck.md b/content/api_omnitruck.md index c65ffd74cb..e061303561 100644 --- a/content/api_omnitruck.md +++ b/content/api_omnitruck.md @@ -21,13 +21,13 @@ Chef Software products and to provide direct download URLs. The URL from which these downloads can be obtained has the following syntax: -```none +```plain https://omnitruck.chef.io///download?p=$PLATFORM&pv=$PLATFORM_VERSION&m=$MACHINE_ARCH&v=latest&prerelease=false&nightlies=false ``` or: -```none +```plain https://omnitruck.chef.io///metadata?p=$PLATFORM&pv=$PLATFORM_VERSION&m=$MACHINE_ARCH&v=latest&prerelease=false&nightlies=false ``` @@ -40,13 +40,13 @@ single step. The `/metadata` and/or `/download` endpoints can be used to download packages for all products: -```none +```plain https://omnitruck.chef.io///download?p=$PLATFORM&pv=$PLATFORM_VERSION&m=$MACHINE_ARCH&v=latest ``` or: -```none +```plain https://omnitruck.chef.io///metadata?p=$PLATFORM&pv=$PLATFORM_VERSION&m=$MACHINE_ARCH&v=latest ``` @@ -164,13 +164,13 @@ This is a list of currently supported products that you can install with the Omn To get the latest supported build for Ubuntu 20.04, enter the following: -```none +```plain https://omnitruck.chef.io/stable/chef/metadata?p=ubuntu&pv=20.04&m=x86_64 ``` to return something like: -```none +```plain sha1 3fe8e8a2f443675f9b82e876cdac8200104451f2 sha256 9f1c1a2c0b1f4e8494664386437bf32f0cb5cbfbd4cb9d23e327767fc65581dc url https://packages.chef.io/files/stable/chef/17.7.29/ubuntu/20.04/chef_17.7.29-1_amd64.deb diff --git a/content/cookbook_versioning.md b/content/cookbook_versioning.md index 8f5416422c..2dc4672da1 100644 --- a/content/cookbook_versioning.md +++ b/content/cookbook_versioning.md @@ -193,7 +193,7 @@ knife cookbook upload redis --force Without the `--force` option specified, an error will be returned similar to: -```none +```bash Version 0.0.0 of cookbook redis is frozen. Use --force to override ``` diff --git a/content/ctl_chef_client.md b/content/ctl_chef_client.md index 1a4632ecf3..4400b4633a 100644 --- a/content/ctl_chef_client.md +++ b/content/ctl_chef_client.md @@ -723,7 +723,7 @@ threads. To increase the system process limits: When the system process limits are too low, an error is returned similar to: -```none +```bash Error Syncing Cookbooks: ================================================================== diff --git a/content/data_bags.md b/content/data_bags.md index 93d829d7e8..5e40ff1be9 100644 --- a/content/data_bags.md +++ b/content/data_bags.md @@ -49,7 +49,7 @@ knife data bag from file BAG_NAME ITEM_NAME.json will load the following file: -```none +```plain data_bags/BAG_NAME/ITEM_NAME.json ``` @@ -255,7 +255,7 @@ knife data bag show passwords mysql where "passwords" is the name of the data bag and "mysql" is the name of the data bag item. This will return something similar to: -```none +```bash id: mysql pass: cipher: aes-256-cbc @@ -319,7 +319,7 @@ items for each environment. A data bag that is storing a top-level key for an environment might look something like this: -```none +```json { "id": "some_data_bag_item", "production" : { diff --git a/content/debug.md b/content/debug.md index 18b4c4ef09..ca68bba7f7 100644 --- a/content/debug.md +++ b/content/debug.md @@ -308,7 +308,7 @@ override[:test][:source] = 'attributes override' To debug the location in which the value of `node[:test][:source]` is set, use chef-shell and run a command similar to: -```none +```ruby pp node.debug_value('test', 'source') ``` diff --git a/content/deprecations_chef_platform_methods.md b/content/deprecations_chef_platform_methods.md index 6385371f18..b04f1d5e8f 100644 --- a/content/deprecations_chef_platform_methods.md +++ b/content/deprecations_chef_platform_methods.md @@ -84,7 +84,7 @@ library-based resources and providers that do not declare provides in which case your Chef Infra Client run is likely full of a compilation of warnings and deprecations: -```none +```plain * foo[it] action doit[2016-12-07T14:28:59-08:00] WARN: Class Chef::Provider::Foo does not declare 'provides :foo'. [2016-12-07T14:28:59-08:00] WARN: This will no longer work in Chef Infra Client 13: you must use 'provides' to use the resource's DSL. (up to date) diff --git a/content/errors.md b/content/errors.md index c0f7649068..efdf7a55a1 100644 --- a/content/errors.md +++ b/content/errors.md @@ -58,16 +58,16 @@ Response: Failed to authenticate as USERNAME. Ensure that your node_name and cl ### Troubleshooting Steps -* Verify you have the correct values in your config.rb file, especially for the `node_name` and `client_key` settings. +- Verify you have the correct values in your config.rb file, especially for the `node_name` and `client_key` settings. -* Check if the file referenced in the `client_key` setting (usually USER.pem) exists. Some common locations include: +- Check if the file referenced in the `client_key` setting (usually USER.pem) exists. Some common locations include: * `~/.chef` * `~/projects/current_project/.chef` * `/etc/chef` If one is present, verify that it has the correct read permissions. -* If there's no client.rb file, regenerate it and ensure the values for the `node_name` and `client_key` settings are correct. +- If there's no client.rb file, regenerate it and ensure the values for the `node_name` and `client_key` settings are correct. ### Organization not found @@ -196,8 +196,8 @@ To fix object permissions: HTTP 500 is a non-specific error message. The full error message for the error Chef Infra Client is receiving can be found in one of the following log files: -* `/var/log/opscode/opscode-account/current` -* `/var/log/opscode/opscode-erchef/current` +- `/var/log/opscode/opscode-account/current` +- `/var/log/opscode/opscode-erchef/current` The error will likely found in a stacktrace from the application error. In some cases the error message will clearly indicate a problem with another service which can be investigated further. For non-obvious errors, please contact Chef and attach the log files. @@ -290,7 +290,7 @@ Work around this issue by supplying the full path to the client.rb file: chef-client -c /etc/chef/client.rb ``` -### Pivotal.rb does not exist +### Pivotal.rb doesn't exist If you're seeing an error like: @@ -302,9 +302,9 @@ ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does no Run the following to restart all of the services: -> ```bash -> chef-server-ctl reconfigure -> ``` +```bash +chef-server-ctl reconfigure +``` Because the Chef Infra Server is composed of many different services that work together to create a functioning system, this step may take a few minutes to complete. @@ -320,7 +320,7 @@ The value of `postgresql['external']` has been changed. #### Possible Causes -* This setting must be set before running +- This setting must be set before running `chef-server-ctl reconfigure`, and may not be changed after {{< warning >}} @@ -331,8 +331,8 @@ Upgrading is not supported at this time. #### Resolution -* Back up the data using `knife ec backup`, create a new backend instance, and then restore the data -* Re-point front end machines at the new backend instance **or** assign the new backend instance the name/VIP of the old backend instance (including certificates, keys, and so on) +- Back up the data using `knife ec backup`, create a new backend instance, and then restore the data +- Re-point front end machines at the new backend instance **or** assign the new backend instance the name/VIP of the old backend instance (including certificates, keys, and so on) ### CSPG010 (cannot connect) @@ -342,10 +342,10 @@ Cannot connect to PostgreSQL on the remote server. #### Possible Causes -* PostgreSQL is not running on the remote server -* The port used by PostgreSQL is blocked by a firewall on the remote server -* Network routing configuration is preventing access to the host -* When using Amazon Web Services (AWS), rules for security groups are preventing the Chef Infra Server from communicating with PostgreSQL +- PostgreSQL is not running on the remote server +- The port used by PostgreSQL is blocked by a firewall on the remote server +- Network routing configuration is preventing access to the host +- When using Amazon Web Services (AWS), rules for security groups are preventing the Chef Infra Server from communicating with PostgreSQL ### CSPG011 (cannot authenticate) @@ -355,8 +355,8 @@ Cannot authenticate to PostgreSQL on the remote server. #### Possible Causes -* Incorrect password specified for `db_superuser_password` -* Incorrect user name specified for `db_superuser` +- Incorrect password specified for `db_superuser_password` +- Incorrect user name specified for `db_superuser` ### CSPG012 (incorrect rules) @@ -367,16 +367,16 @@ Cannot connect to PostgreSQL on the remote server because rules in #### Possible Causes -* There is no `pg_hba.conf` rule for the `db_superuser` in PostgreSQL -* A rule exists for the `db_superuser` in `pg_hba.conf`, but it does not specify `md5` access -* A rule in `pg_hba.conf` specifies an incorrect originating address +- There is no `pg_hba.conf` rule for the `db_superuser` in PostgreSQL +- A rule exists for the `db_superuser` in `pg_hba.conf`, but it does not specify `md5` access +- A rule in `pg_hba.conf` specifies an incorrect originating address #### Resolution Entries in the `pg_hba.conf` file should allow: -* All user names that originate from any Chef Infra Server instance using `md5` authentication. -* A specific application names: `$db_superuser` (the configured superuser name in the chef-server.rb file), `oc_id`, `oc_id_ro`, `opscode_chef`, `opscode_chef_ro`, `bifrost`, and `bifrost_ro` +- All user names that originate from any Chef Infra Server instance using `md5` authentication. +- A specific application names: `$db_superuser` (the configured superuser name in the chef-server.rb file), `oc_id`, `oc_id_ro`, `opscode_chef`, `opscode_chef_ro`, `bifrost`, and `bifrost_ro` ##### pg_hba.conf User Names @@ -430,13 +430,13 @@ SELECT pg_reload_conf(); Rules in the `pg_hba.conf` file should allow only specific application names: -* `$db_superuser` (the configured superuser name in the chef-server.rb file) -* `oc_id` -* `oc_id_ro` -* `opscode_chef` -* `opscode_chef_ro` -* `bifrost` -* `bifrost_ro` +- `$db_superuser` (the configured superuser name in the chef-server.rb file) +- `oc_id` +- `oc_id_ro` +- `opscode_chef` +- `opscode_chef_ro` +- `bifrost` +- `bifrost_ro` ### CSPG013 (incorrect permissions) @@ -446,9 +446,9 @@ The `db_superuser` account has incorrect permissions. #### Possible Causes -* The `db_superuser` account has not been granted `SUPERUSER` access +- The `db_superuser` account has not been granted `SUPERUSER` access -* The `db_superuser` account has not been granted `CREATE DATABASE` and `CREATE ROLE` privileges +- The `db_superuser` account has not been granted `CREATE DATABASE` and `CREATE ROLE` privileges ```bash ALTER ROLE "$your_db_superuser_name" WITH SUPERUSER @@ -468,7 +468,7 @@ Bad version of PostgreSQL. #### Possible Causes -* The remote server is not running PostgreSQL version 9.2.x +- The remote server is not running PostgreSQL version 9.2.x ### CSPG015 (missing database) @@ -478,12 +478,12 @@ The database template `template1` does not exist. #### Possible Causes -* The `template1` database template has been removed from the remote +- The `template1` database template has been removed from the remote server #### Resolution -* Run the following command (as a superuser): +- Run the following command (as a superuser): ```bash CREATE DATABASE template1 TEMPLATE template0 @@ -503,13 +503,13 @@ One (or more) of the PostgreSQL databases already exists. #### Possible Causes -* The `opscode_chef`, `oc_id`, and/or `bifrost` databases already exist on the remote machine -* The PostgreSQL database exists for another application +- The `opscode_chef`, `oc_id`, and/or `bifrost` databases already exist on the remote machine +- The PostgreSQL database exists for another application #### Resolution -* Verify that the `opscode_chef`, `oc_id`, and/or `bifrost` databases exist, and then verify that they are not being used by another internal application -* Back up the PostgreSQL data, remove the existing databases, and reconfigure the Chef server +- Verify that the `opscode_chef`, `oc_id`, and/or `bifrost` databases exist, and then verify that they are not being used by another internal application +- Back up the PostgreSQL data, remove the existing databases, and reconfigure the Chef server ### CSPG017 (user exists) @@ -519,13 +519,13 @@ One (or more) of the PostgreSQL predefined users already exists. #### Possible Causes -* The `opscode_chef`, `ospcode_chef_ro`, `bifrost`, `bifrost_ro`, `oc_id`, or `oc_id_ro` users already exist on the remote machine -* The `postgresql['vip']` setting is configured to a remote host, but `postgresql['external']` is not set to `true`, which causes the `opscode_chef` and `ospcode_chef_ro` users to be created before the machine is reconfigured, which will return a permissions error -* Existing, valid naming conflicts are present, where the users were created independently of the Chef server +- The `opscode_chef`, `ospcode_chef_ro`, `bifrost`, `bifrost_ro`, `oc_id`, or `oc_id_ro` users already exist on the remote machine +- The `postgresql['vip']` setting is configured to a remote host, but `postgresql['external']` is not set to `true`, which causes the `opscode_chef` and `ospcode_chef_ro` users to be created before the machine is reconfigured, which will return a permissions error +- Existing, valid naming conflicts are present, where the users were created independently of the Chef server #### Resolution -* Run the following, if it is safe to do so, to update the user name that is specified in the error message: +- Run the following, if it is safe to do so, to update the user name that's specified in the error message: ```bash DROP ROLE "name-of-user"; @@ -533,9 +533,9 @@ One (or more) of the PostgreSQL predefined users already exists. or change the name of the user by updating following settings in the chef-server.rb configuration file: - ```none + ```ruby oc_id['sql_user'] = 'alternative_username' - oc_id['sql_ro_user'] = alternative_username_for_ro_access' + oc_id['sql_ro_user'] = 'alternative_username_for_ro_access' opscode_erchef['sql_user'] = 'alternative_username' opscode_erchef['sql_ro_user'] = 'alternative_username_for_ro_access' oc_bifrost['sql_ro_user'] = 'alternative_username' diff --git a/content/recipes.md b/content/recipes.md index 363871a5bc..75e62283c8 100644 --- a/content/recipes.md +++ b/content/recipes.md @@ -316,7 +316,7 @@ cookbook in which the recipe is located is available to the system on which chef-solo is running. For example, a file named `dna.json` contains the following details: -```none +```json { "run_list": ["recipe[apache2]"] } diff --git a/content/release_notes_chefdk.md b/content/release_notes_chefdk.md index 915efca0c3..2a42685958 100644 --- a/content/release_notes_chefdk.md +++ b/content/release_notes_chefdk.md @@ -1319,7 +1319,7 @@ makes provisioning systems in AWS even easier. This command lists all VPCs in your environment including the ID, which you need when provisioning new systems into a specific VPC. -```none +```bash knife ec2 vpc list ID State CIDR Block Instance Tenancy DHCP Options ID Default VPC? vpc-b1bc8d9d available 10.0.0.0/16 default dopt-1d78412a No @@ -1331,7 +1331,7 @@ vpc-daafd931 available 172.0.0.0/16 default dopt-1d78412a Yes This command lists all ENIs in your environment including the ID, which you need when adding the ENI to a newly provisioned instance. -```none +```bash knife ec2 eni list ID Status AZ Public IP Private IPs IPv6 IPs Subnet ID VPC ID eni-0123f25ae7805b651 in-use us-west-2a 63.192.209.236 10.0.0.204 subnet-4ef3b123 vpc-b1bc8d9d @@ -1344,7 +1344,7 @@ This command lists all security groups in your environment including the ID, which you need when assigning a newly provisioned instance to a group. -```none +```bash $knife ec2 securitygroup list ID Name VPC ID sg-12332d875a4a123d6 not-today-hackers vpc-dbbf59a2 @@ -1356,7 +1356,7 @@ sg-123708ab12388cac5 open-to-the-world vpc-dbbf59a2 This command lists all subnets in your environment including the ID, which you need when placing a newly provisioned instance in a subnet. -```none +```bash knife ec2 subnet list ID State CIDR Block AZ Available IPs AZ Default? Maps Public IP? VPC ID subnet-bd2333a9 available 172.31.0.0/20 us-west-2b 4091 Yes Yes vpc-b1bc8d9d @@ -1526,7 +1526,7 @@ useful for local platform image testing. kitchen.yml example: -```none +```bash driver: name: dokken pull_platform_image: false @@ -2612,7 +2612,7 @@ cookbook(s) given on the command line. Run: - ```none + ```bash chef install ./base.rb Building policy base @@ -2642,7 +2642,7 @@ cookbook(s) given on the command line. Run: - ```none + ```bash chef install ./users.rb Building policy users diff --git a/content/reusable/md/chef_repo_many_users_same_knife.md b/content/reusable/md/chef_repo_many_users_same_knife.md index 29bbe5ce8d..d26903b673 100644 --- a/content/reusable/md/chef_repo_many_users_same_knife.md +++ b/content/reusable/md/chef_repo_many_users_same_knife.md @@ -9,7 +9,7 @@ when each chef-repo points to a different chef server or organization. Example config.rb: -```none +```ruby current_dir = File.dirname(__FILE__) user = ENV['CHEF_USER'] || ENV['USER'] node_name user diff --git a/content/reusable/md/cookbooks_recipe_tags.md b/content/reusable/md/cookbooks_recipe_tags.md index e5e6567408..62955f3bee 100644 --- a/content/reusable/md/cookbooks_recipe_tags.md +++ b/content/reusable/md/cookbooks_recipe_tags.md @@ -40,7 +40,7 @@ end Will return something like this: -```none +```plain [Thu, 22 Jul 2010 18:01:45 +0000] INFO: Hey I'm test_node [Thu, 22 Jul 2010 18:01:45 +0000] INFO: I am not tagged ``` diff --git a/content/reusable/md/install_chef_client_windows_as_scheduled_task.md b/content/reusable/md/install_chef_client_windows_as_scheduled_task.md index 975131ad8e..c604f08850 100644 --- a/content/reusable/md/install_chef_client_windows_as_scheduled_task.md +++ b/content/reusable/md/install_chef_client_windows_as_scheduled_task.md @@ -7,7 +7,7 @@ command after Chef Infra Client is installed: For example: -```none +```powershell SCHTASKS.EXE /CREATE /TN ChefClientSchTask /SC MINUTE /MO 30 /F /RU "System" /RP /RL HIGHEST /TR "cmd /c \"C:\opscode\chef\embedded\bin\ruby.exe C:\opscode\chef\bin\chef-client -L C:\chef\chef-client.log -c C:\chef\client.rb\"" ``` diff --git a/content/reusable/md/packages_install_script_examples.md b/content/reusable/md/packages_install_script_examples.md index 034f162dbc..474202fb11 100644 --- a/content/reusable/md/packages_install_script_examples.md +++ b/content/reusable/md/packages_install_script_examples.md @@ -9,6 +9,6 @@ curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -v 15.8.23 To install the latest version of Chef Workstation on Windows from the `current` channel: -```none +```powershell . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -channel current -project chef-workstation ``` diff --git a/content/reusable/md/packages_install_script_run_windows.md b/content/reusable/md/packages_install_script_run_windows.md index 54488b484c..163ea05bbd 100644 --- a/content/reusable/md/packages_install_script_run_windows.md +++ b/content/reusable/md/packages_install_script_run_windows.md @@ -1,6 +1,6 @@ On Windows systems, invoke the Chef Software Install script using Windows PowerShell: -```none +```powershell . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install ``` diff --git a/content/reusable/md/search_key_nested.md b/content/reusable/md/search_key_nested.md index 524bf8457b..bbd90b3ede 100644 --- a/content/reusable/md/search_key_nested.md +++ b/content/reusable/md/search_key_nested.md @@ -6,7 +6,7 @@ to the top-level, flattening them into compound fields that support wildcard search patterns. By combining wildcards with range-matching patterns and wildcard -queries, it is possible to perform powerful searches, such as using +queries, it's possible to perform powerful searches, such as using the vendor part of the MAC address to find every node that has a network card made by the specified vendor. @@ -69,13 +69,13 @@ Consider the following snippet of JSON data: Before this data is indexed on the Chef Infra Server, the nested fields are extracted into the top level, similar to: -```none +```ruby "broadcast" => "192.168.0.255", "flags" => ["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"] "mtu" => "1500" ``` -which allows searches like the following to find data that is present in +which allows searches like the following to find data that's present in this node: ```ruby @@ -98,7 +98,7 @@ This data is also flattened into various compound fields, which follow the same pattern as the JSON hierarchy and use underscores (`_`) to separate the levels of data, similar to: -```none +```ruby # ...snip... "network_interfaces_en1_addresses_192.0.2.0_broadcast" => "192.168.0.255", "network_interfaces_en1_addresses_fe80::fa1e:tldr_family" => "inet6", @@ -106,7 +106,7 @@ separate the levels of data, similar to: # ...snip... ``` -which allows searches like the following to find data that is present in +which allows searches like the following to find data that's present in this node: ```ruby @@ -115,7 +115,7 @@ node "network_interfaces_en1_addresses:192.0.2.0" This flattened data structure also supports using wildcard compound fields, which allow searches to omit levels within the JSON data -structure that are not important to the search query. In the following +structure that aren't important to the search query. In the following example, an asterisk (`*`) is used to show where the wildcard can exist when searching for a nested field: From f40662f52f0f3a57888213a204aa2a79fa593b4a Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Mon, 4 Dec 2023 17:28:24 -0500 Subject: [PATCH 2/3] Lint fixes Signed-off-by: Ian Maddaus --- content/data_bags.md | 4 +-- content/errors.md | 63 ++++++++++++++++++++++---------------------- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/content/data_bags.md b/content/data_bags.md index 5e40ff1be9..6f567586e5 100644 --- a/content/data_bags.md +++ b/content/data_bags.md @@ -221,7 +221,7 @@ arguments and the following options: | Option | Description | |--------------------|-------------------------------------------------------------| -| `--secret SECRET` | The encryption key that is used for values contained within a data bag item. If `secret` is not specified, Chef Infra Client looks for a secret at the path specified by the `encrypted_data_bag_secret` setting in the client.rb file. | +| `--secret SECRET` | The encryption key that's used for values contained within a data bag item. If `secret` is not specified, Chef Infra Client looks for a secret at the path specified by the `encrypted_data_bag_secret` setting in the client.rb file. | | `--secret-file FILE` | The path to the file that contains the encryption key. | ### Secret Keys @@ -316,7 +316,7 @@ be used to store shared environment data within a data bag: by using a top-level key that corresponds to the environment or by using separate items for each environment. -A data bag that is storing a top-level key for an environment might look +A data bag stores a top-level key for an environment might look something like this: ```json diff --git a/content/errors.md b/content/errors.md index efdf7a55a1..a9875b71f3 100644 --- a/content/errors.md +++ b/content/errors.md @@ -23,7 +23,7 @@ There are multiple causes of the Chef 401 "Unauthorized" error, so please use th If you're receiving an error like the following it most likely means you'll need to regenerate the ORGANIZATION-validator.pem file: ```bash -INFO: Client key /etc/chef/client.pem is not present - registering +INFO: Client key /etc/chef/client.pem isn't present - registering INFO: HTTP Request Returned 401 Unauthorized: Failed to authenticate as ORGANIZATION-validator. Ensure that your node_name and client key are correct. FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out FATAL: Net::HTTPClientException: 401 "Unauthorized" @@ -61,9 +61,10 @@ Response: Failed to authenticate as USERNAME. Ensure that your node_name and cl - Verify you have the correct values in your config.rb file, especially for the `node_name` and `client_key` settings. - Check if the file referenced in the `client_key` setting (usually USER.pem) exists. Some common locations include: - * `~/.chef` - * `~/projects/current_project/.chef` - * `/etc/chef` + + - `~/.chef` + - `~/projects/current_project/.chef` + - `/etc/chef` If one is present, verify that it has the correct read permissions. @@ -71,7 +72,7 @@ Response: Failed to authenticate as USERNAME. Ensure that your node_name and cl ### Organization not found -If you see this error when trying to recreate the ORGANIZATION-validator.pem, it is possible that Chef Infra Client itself was deleted. In this situation, the ORGANIZATION-validator.pem will need to be recreated. In these directions, `ORGANIZATION` should be replaced with the name of your organization. +If you see this error when trying to recreate the ORGANIZATION-validator.pem, it's possible that Chef Infra Client itself was deleted. In this situation, the ORGANIZATION-validator.pem will need to be recreated. In these directions, `ORGANIZATION` should be replaced with the name of your organization. {{< readfile file="content/reusable/md/manage_webui_policy_validation_reset_key.md" >}} @@ -80,7 +81,7 @@ If you see this error when trying to recreate the ORGANIZATION-validator.pem, it If the system clock drifts more than 15 minutes from the actual time, the following type of error will be shown: ```bash -INFO: Client key /etc/chef/client.pem is not present - registering +INFO: Client key /etc/chef/client.pem isn't present - registering INFO: HTTP Request Returned 401 Unauthorized: Failed to authenticate as ORGANIZATION-validator. Synchronize the clock on your host. FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out FATAL: Net::HTTPClientException: 401 "Unauthorized" @@ -126,7 +127,7 @@ The general `Net::HTTPClientException: 401 "Unauthorized"` error will usually oc 2. Make sure to use the same `node_name` as the initial Chef Infra Client run. This can happen for a number of reasons. For example, if the - client.rb file does not specify the correct node name and the + client.rb file doesn't specify the correct node name and the system's hostname has changed. Running `chef-client -l debug` will identify the node name being @@ -234,7 +235,7 @@ In working with Chef, you'll most likely encounter issues in your regular workfl If you're seeing an error like: ```bash -Client key /etc/chef/client.pem is notresent - registering +Client key /etc/chef/client.pem isn'tresent - registering WARN: Failed to read the private key /etc/che/validation.pem: # FATAL: Stacktrace dumped to /etc/chef/cache/chef-stacktrace.out FATAL: Chef::Exceptions::PrivateKeyMissing: I cannot read /etc/chef/validation.pem, which you told me to use to sign requests @@ -249,7 +250,7 @@ It means that Chef Infra Client could not find your validation.pem. ### Commit or stash your changes -This is not really an error, but can be confusing to new users. When you try to install a cookbook with changes that have not been committed to git you will get this error: +This isn't really an error, but can be confusing to new users. When you try to install a cookbook with changes that have not been committed to git you will get this error: ```bash Installing getting-started to /home/jes/chef-repo/.chef/../cookbooks @@ -295,7 +296,7 @@ chef-client -c /etc/chef/client.rb If you're seeing an error like: ```bash -ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist +ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb doesn't exist ``` #### Troubleshooting Steps @@ -318,21 +319,21 @@ The following error messages may be present when configuring the Chef Infra Serv The value of `postgresql['external']` has been changed. -#### Possible Causes +#### Possible causes - This setting must be set before running `chef-server-ctl reconfigure`, and may not be changed after {{< warning >}} -Upgrading is not supported at this time. +Upgrading isn't supported at this time. {{< /warning >}} #### Resolution - Back up the data using `knife ec backup`, create a new backend instance, and then restore the data -- Re-point front end machines at the new backend instance **or** assign the new backend instance the name/VIP of the old backend instance (including certificates, keys, and so on) +- Re-point frontend machines at the new backend instance **or** assign the new backend instance the name/VIP of the old backend instance (including certificates and keys) ### CSPG010 (cannot connect) @@ -340,9 +341,9 @@ Upgrading is not supported at this time. Cannot connect to PostgreSQL on the remote server. -#### Possible Causes +#### Possible causes -- PostgreSQL is not running on the remote server +- PostgreSQL isn't running on the remote server - The port used by PostgreSQL is blocked by a firewall on the remote server - Network routing configuration is preventing access to the host - When using Amazon Web Services (AWS), rules for security groups are preventing the Chef Infra Server from communicating with PostgreSQL @@ -353,7 +354,7 @@ Cannot connect to PostgreSQL on the remote server. Cannot authenticate to PostgreSQL on the remote server. -#### Possible Causes +#### Possible causes - Incorrect password specified for `db_superuser_password` - Incorrect user name specified for `db_superuser` @@ -365,10 +366,10 @@ Cannot authenticate to PostgreSQL on the remote server. Cannot connect to PostgreSQL on the remote server because rules in `pg_hba` are incorrect. -#### Possible Causes +#### Possible causes -- There is no `pg_hba.conf` rule for the `db_superuser` in PostgreSQL -- A rule exists for the `db_superuser` in `pg_hba.conf`, but it does not specify `md5` access +- No `pg_hba.conf` rule exists for the `db_superuser` in PostgreSQL +- A rule exists for the `db_superuser` in `pg_hba.conf`, but it doesn't specify `md5` access - A rule in `pg_hba.conf` specifies an incorrect originating address #### Resolution @@ -444,11 +445,11 @@ Rules in the `pg_hba.conf` file should allow only specific application names: The `db_superuser` account has incorrect permissions. -#### Possible Causes +#### Possible causes -- The `db_superuser` account has not been granted `SUPERUSER` access +- The `db_superuser` account hasn't been granted `SUPERUSER` access -- The `db_superuser` account has not been granted `CREATE DATABASE` and `CREATE ROLE` privileges +- The `db_superuser` account hasn't been granted `CREATE DATABASE` and `CREATE ROLE` privileges ```bash ALTER ROLE "$your_db_superuser_name" WITH SUPERUSER @@ -466,17 +467,17 @@ The `db_superuser` account has incorrect permissions. Bad version of PostgreSQL. -#### Possible Causes +#### Possible causes -- The remote server is not running PostgreSQL version 9.2.x +- The remote server isn't running PostgreSQL version 9.2.x ### CSPG015 (missing database) #### Reason -The database template `template1` does not exist. +The database template `template1` doesn't exist. -#### Possible Causes +#### Possible causes - The `template1` database template has been removed from the remote server @@ -501,14 +502,14 @@ The database template `template1` does not exist. One (or more) of the PostgreSQL databases already exists. -#### Possible Causes +#### Possible causes - The `opscode_chef`, `oc_id`, and/or `bifrost` databases already exist on the remote machine - The PostgreSQL database exists for another application #### Resolution -- Verify that the `opscode_chef`, `oc_id`, and/or `bifrost` databases exist, and then verify that they are not being used by another internal application +- Verify that the `opscode_chef`, `oc_id`, and/or `bifrost` databases exist, and then verify that they're not being used by another internal application - Back up the PostgreSQL data, remove the existing databases, and reconfigure the Chef server ### CSPG017 (user exists) @@ -517,15 +518,15 @@ One (or more) of the PostgreSQL databases already exists. One (or more) of the PostgreSQL predefined users already exists. -#### Possible Causes +#### Possible causes - The `opscode_chef`, `ospcode_chef_ro`, `bifrost`, `bifrost_ro`, `oc_id`, or `oc_id_ro` users already exist on the remote machine -- The `postgresql['vip']` setting is configured to a remote host, but `postgresql['external']` is not set to `true`, which causes the `opscode_chef` and `ospcode_chef_ro` users to be created before the machine is reconfigured, which will return a permissions error +- The `postgresql['vip']` setting is configured to a remote host, but `postgresql['external']` isn't set to `true`, which causes the `opscode_chef` and `ospcode_chef_ro` users to be created before the machine is reconfigured, which will return a permissions error - Existing, valid naming conflicts are present, where the users were created independently of the Chef server #### Resolution -- Run the following, if it is safe to do so, to update the user name that's specified in the error message: +- Run the following, if it's safe to do so, to update the user name that's specified in the error message: ```bash DROP ROLE "name-of-user"; From 4e2319febf8d7a72b8417b1fafca225ce0210870 Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Mon, 4 Dec 2023 17:41:50 -0500 Subject: [PATCH 3/3] More lints Signed-off-by: Ian Maddaus --- content/errors.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/content/errors.md b/content/errors.md index a9875b71f3..1dd8858ecb 100644 --- a/content/errors.md +++ b/content/errors.md @@ -29,7 +29,7 @@ FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out FATAL: Net::HTTPClientException: 401 "Unauthorized" ``` -#### Troubleshooting Steps +#### Troubleshooting steps 1. Check if the ORGANIZATION-validator.pem file exists in one of the following locations: @@ -56,7 +56,7 @@ ERROR: Failed to authenticate to https://api.opscode.com/organizations/ORGANIZAT Response: Failed to authenticate as USERNAME. Ensure that your node_name and client key are correct. ``` -### Troubleshooting Steps +### Troubleshooting steps - Verify you have the correct values in your config.rb file, especially for the `node_name` and `client_key` settings. @@ -93,7 +93,7 @@ To resolve this error, synchronize the clock with an NTP server. The general `Net::HTTPClientException: 401 "Unauthorized"` error will usually occur for one of two reasons. -#### Troubleshooting Steps +#### Troubleshooting steps 1. Make sure your `client.pem` is valid. @@ -158,7 +158,7 @@ FATAL: Net::HTTPClientException: 403 "Forbidden" this is an indication that there is an issue with permissions on the Chef Infra Server. -### Troubleshooting Steps +### Troubleshooting steps In Chef, there are two different types of permissions issues, object specific and global permissions. To figure out which type of permission issue you're experiencing, run Chef Infra Client again using the `-l debug` options to see debugging output. @@ -243,14 +243,14 @@ FATAL: Chef::Exceptions::PrivateKeyMissing: I cannot read /etc/chef/validation.p It means that Chef Infra Client could not find your validation.pem. -#### Troubleshooting Steps +#### Troubleshooting steps 1. Make sure your `validation.pem` or `ORGANIZATION-validator.pem` is downloaded and accessible by the current user. 2. Make sure your client.rb points to the location of your validator pem. ### Commit or stash your changes -This isn't really an error, but can be confusing to new users. When you try to install a cookbook with changes that have not been committed to git you will get this error: +This isn't an error, but can be confusing to new users. When you try to install a cookbook with changes that you haven't committed to Git, you will get this error: ```bash Installing getting-started to /home/jes/chef-repo/.chef/../cookbooks @@ -261,7 +261,7 @@ ERROR: You have uncommitted changes to your cookbook repo: Commit or stash your changes before importing cookbooks ``` -#### Troubleshooting Steps +#### Troubleshooting steps Solve this by committing the cookbook changes. For example, the following command would commit all new changes with the message "updates". @@ -283,7 +283,7 @@ WARN: No such file or directory - /etc/chef/client.rb FATAL: Chef::Exceptions::PrivateKeyMissing: I cannot read /etc/chef/validation.pem, which you told me to use to sign requests! ``` -#### Troubleshooting Steps +#### Troubleshooting steps Work around this issue by supplying the full path to the client.rb file: @@ -299,7 +299,7 @@ If you're seeing an error like: ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb doesn't exist ``` -#### Troubleshooting Steps +#### Troubleshooting steps Run the following to restart all of the services: