-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TSPROJ-7446:do not abort if dcr failure on a single node
TSPROJ-7490:Added troubleshooting guide for common scenarios TSPROJ-7489:Try to guess mongod log paths when they are relative TSPROJ-7488:abort if FS free space below one 1GB
Showing
5 changed files
with
147 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### Description | ||
This documents helps with common troubleshooting scenarios | ||
|
||
### Troubleshooting Remote Copy of Mongod Logs and FTDC Failures due to Known Hosts Error | ||
|
||
* **Understanding the `known_hosts` file**: The `known_hosts` file is a security feature used by SSH (Secure Shell) to verify the identity of remote hosts. It stores the public keys of all known hosts, which are used to authenticate connections. | ||
* **Step 1: Verify the `known_hosts` file** | ||
+ Ensure that the `known_hosts` file is properly populated with the nodes you're trying to connect to. | ||
+ Check if the file exists in the default location (`~/.ssh/known_hosts`) and contains the public keys of all expected hosts. | ||
* **Step 2: Configure SSH to skip known hosts checking (Workaround)** | ||
+ Edit the `~/.ssh/config` file using a text editor (e.g., `nano` or `vim`). | ||
+ Add the following lines to the end of the file: | ||
```bash | ||
Host * | ||
UserKnownHostsFile /dev/null | ||
StrictHostKeyChecking no | ||
``` | ||
|
||
* **Step 3: Test the connection:** Try running ssh on remote nodes to see that it does not prompt for known_hosts. | ||
|
||
Note: This workaround disables strict host key checking, which may compromise security. It's recommended to properly populate the `known_hosts` file or use a more secure alternative solution. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2020 MongoDB Inc | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package mongologarchiver | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
) | ||
|
||
type LogPath struct { | ||
DiagDirPath string | ||
CurrentLogPath string | ||
PreparedLogPath string | ||
} | ||
|
||
func (lp *LogPath) ProcessLogPath() { | ||
|
||
lp.PreparedLogPath = lp.CurrentLogPath | ||
if lp.logPathStartsWithDotSlash() && lp.DiagDirPath != "" { | ||
lp.PreparedLogPath = lp.logPathWithBestEstimatedParent() | ||
} | ||
|
||
} | ||
|
||
func (lp *LogPath) logPathWithBestEstimatedParent() string { | ||
|
||
//remove dot slash prefix from logPath | ||
//extract from logpath the dirname upto first slash | ||
//it could also not be a dir example if logPath was ./mongod.log | ||
logPathFirstPath := strings.Split(lp.CurrentLogPath[2:], "/")[0] | ||
|
||
parentPath := []string{} | ||
|
||
for _, ddpath := range strings.Split(lp.DiagDirPath[1:len(lp.DiagDirPath)-1], "/") { | ||
if ddpath == logPathFirstPath { | ||
break | ||
} | ||
parentPath = append(parentPath, ddpath) | ||
} | ||
|
||
return fmt.Sprintf("/%s", strings.Join(parentPath, "/")) + "/" + logPathFirstPath | ||
|
||
} | ||
|
||
func (lp *LogPath) logPathStartsWithDotSlash() bool { | ||
return strings.HasPrefix(lp.CurrentLogPath, "./") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters