Skip to content

Commit a8f6eb3

Browse files
ZachZach
authored andcommitted
Merge remote-tracking branch 'origin/main' into zach/cac-to-version-control
2 parents c0c667d + d1b3520 commit a8f6eb3

File tree

7 files changed

+103
-6
lines changed

7 files changed

+103
-6
lines changed

dictionary-octopus.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,13 @@ configmap
6262
Conjur
6363
contoso
6464
cooldown
65+
coredump
6566
corepack
6667
Cpath
6768
Cpus
6869
Cpuset
6970
createartifact
71+
createdump
7072
creds
7173
crossorigin
7274
cscfg
@@ -136,6 +138,7 @@ fontawesome
136138
frontmatter
137139
g3662re9njtelsyfhm7t
138140
gcloud
141+
gcore
139142
getenv
140143
gifs
141144
gitcredential
@@ -224,6 +227,7 @@ mattc
224227
maxage
225228
mdast
226229
milli
230+
minidump
227231
minifier
228232
MITM
229233
Moines
@@ -328,6 +332,7 @@ Println
328332
printverbose
329333
printwait
330334
printwarning
335+
procexp
331336
PROGRAMFILES
332337
projectgroup
333338
projectgroups
-136 KB
Loading
-102 KB
Loading

src/pages/docs/deployments/custom-scripts/index.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,19 @@ Octopus supports the following scripting environments:
1717
- PowerShell scripts (.ps1)
1818
- Bash scripts (.sh)
1919
- Python scripts (.py)
20-
- C# scripts (.csx) using [ScriptCS](https://github.com/scriptcs/scriptcs)
20+
- C# scripts (.csx) using [dotnet-script](https://github.com/dotnet-script/dotnet-script)
2121
- F# scripts (.fsx)
2222

2323
Octopus can run these scripts on almost any operating system as long as the script runtime is installed and configured correctly.
2424

25+
:::div{.warning}
26+
C# scripts (.csx) using [ScriptCS](https://github.com/scriptcs/scriptcs) will still work, but is marked for deprecation. You can find the announcement from ScriptCS that the project is no longer being maintained [here](https://github.com/scriptcs/scriptcs/issues/1323).
27+
28+
C# scripts using ScriptCS will generate warning in your Octopus task logs from version 2024.2.7996+ advising users to use dotnet-script. For more information and ScriptCS to dotnet-script migration instructions, see our [blog announcement here](https://octopus.com/blog/rfc-migrate-scriptcs-dotnet-script).
29+
30+
To view previous and upcoming deprecations, please visit our [deprecations page](https://octopus.com/docs/deprecations).
31+
:::
32+
2533
## What you can do with custom scripts
2634

2735
If an activity can be scripted, Octopus can run that script as a standalone activity or as part of a larger orchestration.

src/pages/docs/kubernetes/targets/kubernetes-agent/troubleshooting/index.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,56 @@ If you are using the default NFS storage however, then the script pod would be d
7878
- being evicted due to exceeding its storage quota
7979
- being moved or restarted as part of routine cluster operation
8080

81+
### `Pod log line is not correctly pipe-delimited: 'sh: 1: /octopus/Work/_/bootstrapRunner: Exec format error`
82+
83+
This error indicates that the script pod has been scheduled onto a node with a different architecture (ARM/AMD) to the Tentacle pod.
84+
85+
There is currently a limitation that the script pods must run on the nodes with the same architecture as the Tentacle pod. This is due to a bootstrap runner utility that is built and packaged into the tentacle container image, but is run inside the script pod.
86+
87+
To mitigate this issue, you can set the pod affinity for both the Tentacle and script pods as part of a Helm update command.
88+
The steps to do this are:
89+
90+
1. Determine what node architecture you want to run on. This will be either `amd64` or `arm64`
91+
2. Create a YAML file with the following content (replacing `[ARCH]` with the architecture determined in 1.):
92+
93+
```yaml
94+
agent:
95+
affinity:
96+
nodeAffinity:
97+
requiredDuringSchedulingIgnoredDuringExecution:
98+
nodeSelectorTerms:
99+
- matchExpressions:
100+
- key: kubernetes.io/os
101+
operator: In
102+
values:
103+
- linux
104+
- key: kubernetes.io/arch
105+
operator: In
106+
values:
107+
- [ARCH]
108+
109+
scriptPods:
110+
affinity:
111+
nodeAffinity:
112+
requiredDuringSchedulingIgnoredDuringExecution:
113+
nodeSelectorTerms:
114+
- matchExpressions:
115+
- key: kubernetes.io/os
116+
operator: In
117+
values:
118+
- linux
119+
- key: kubernetes.io/arch
120+
operator: In
121+
values:
122+
- [ARCH]
123+
```
124+
125+
3. In a terminal connected to the cluster with the agent installed, run a Helm upgrade referencing the YAML file created above. You can get the `HELM-RELEASE-NAME` and `NAMESPACE` from the **Connectivity** page on the **Deployment Target** or **Worker** details page
126+
127+
```bash
128+
helm upgrade --atomic --namespace [NAMESPACE] --reset-then-reuse-values -f [YAML-FILENAME] [HELM-RELEASE-NAME] oci://registry-1.docker.io/octopusdeploy/kubernetes-agent
129+
```
130+
81131
## Health Checks and Upgrades
82132

83133
### `error looking up service account octopus-agent-XXX/octopus-agent-auto-upgrader: serviceaccount \"octopus-agent-auto-upgrader\" not found`

src/pages/docs/support/get-the-raw-output-from-a-task.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ To download the task log do the following:
1818
![](/docs/support/images/tasklog.png)
1919
:::
2020

21-
3. Click **RAW** to display the raw log.
22-
3. Click **DOWNLOAD** to download the log to a text file.
21+
3. Click the **Download** button on the right to download the raw task log.
2322

2423
:::figure
2524
![](/docs/support/images/tasklog2.png)

src/pages/docs/support/process-dumps.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Due to the nature of data contained in a process dump, we take great care in han
2222
We will also delete them as soon as they have been analyzed.
2323
:::
2424

25+
## Creating process dumps on Windows
2526
If you are capturing a process on your Octopus Server follow the below instructions:
2627

2728
1. Right click on the task bar and select **Task Manager**.
@@ -36,13 +37,13 @@ When capturing a process dump for **Tentacle.exe**, please also capture any chil
3637

3738
We recommend using [Process Explorer](https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) to capture child processes associated with Tentacle.exe, such as the Calamari.exe process. To capture child processes for Tentacle:
3839

39-
1. On the tentacle that is having the issues. Download and install [Process Explorer](https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer)
40+
1. On the Tentacle that is having the issues. Download and install [Process Explorer](https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer)
4041
from Microsoft.
41-
1. Once installed you need to **run the program as an administrator** by right clicking on the relevent procexp.exe file and selecting `Run as Administrator`.
42+
1. Once installed you need to **run the program as an administrator** by right clicking on the relevant procexp.exe file and selecting `Run as Administrator`.
4243
1. Once opened you need to make sure the process tree is shown by clicking on the `View` menu on the top navigation bar and selecting `Show Process Tree`.
4344
1. You will notice the program looks similar to task manager. Navigate to the **tentacle.exe** process in the list of tasks.
4445
1. Run the process that is causing the issue/fault in Octopus (ie run the deployment or task that is failing).
45-
1. Once that task is running in Octopus go back to Process Explorer on the tentacle and you will now see the tentacle.exe process can be expanded to show the calamari process. This can be expanded further to see the powershell.exe processes associated with both the tentacle.exe and calamari.exe.
46+
1. Once that task is running in Octopus go back to Process Explorer on the Tentacle and you will now see the tentacle.exe process can be expanded to show the Calamari process. This can be expanded further to see the powershell.exe processes associated with both the tentacle.exe and calamari.exe.
4647
1. To capture the dump file for calamari.exe make sure your tentacle.exe process is expanded in process explorer and find calamari.exe.
4748
1. Right click on it and select `Create Dump` and then `Create Full Dump`.
4849
1. Note where the file is saved (generally in your temp folder).
@@ -55,6 +56,40 @@ Sometimes the deployment in Octopus can complete or error out too quickly, which
5556
![Process explorer capturing child processes from Tentacle](/docs/support/images/processexplorer.png)
5657
:::
5758

59+
## Creating process dumps on Linux
60+
To aid in debugging, process dumps on Linux should be captured using `createdump` or the `dotnet-dump` tool. Debuggers such as `gcore` and `gdb` produce dumps that are not portable, leading to difficulties diagnosing issues.
61+
62+
`createdump` is included with installations of the dotnet runtime. You will first need to install the dotnet runtime by [following the instructions on the dotnet download page](https://dotnet.microsoft.com/en-us/download).
63+
64+
Here is an example of a manual installation:
65+
```bash
66+
wget https://builds.dotnet.microsoft.com/dotnet/Runtime/8.0.15/dotnet-runtime-8.0.15-linux-x64.tar.gz
67+
DOTNET_FILE=dotnet-runtime-8.0.15-linux-x64.tar.gz
68+
export DOTNET_ROOT=~/.dotnet
69+
mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
70+
export PATH=$PATH:$DOTNET_ROOT
71+
```
72+
73+
Once the dotnet runtime has been installed, locate the installation directory by running `dotnet --list-runtimes`. `createdump` is located in the runtime directory, but requires the id of the process you intend to create a dump for.
74+
75+
Use `ps ax` to list the running processes on the machine, taking note of the process PID. To find Calamari, for example, use `ps ax | grep Calamari`. Then, capture a dump of the process using `createdump`:
76+
77+
```bash
78+
> dotnet --list-runtimes
79+
Microsoft.NETCore.App 8.0.15 [/home/ec2-user/.dotnet/shared/Microsoft.NETCore.App]
80+
> ps ax | grep Calamari
81+
14220 ? Ssl 0:00 /home/ec2-user/.octopus/ec2-3-25-60-213-ap-southeast-2-compute-amazonaws-com/Tools/Calamari.linux-x64/27.3.5-hotfix0001/Calamari run-script
82+
14266 pts/0 S+ 0:00 grep --color=auto Calamari
83+
> /home/ec2-user/.dotnet/shared/Microsoft.NETCore.App/8.0.15/createdump 14220
84+
[createdump] Gathering state for process 14220 Calamari
85+
[createdump] Writing minidump with heap to file /tmp/coredump.14220
86+
[createdump] Written 157319168 bytes (38408 pages) to core file
87+
[createdump] Target process is alive
88+
[createdump] Dump successfully written in 6296ms
89+
```
90+
91+
92+
5893
## Dump file analysis
5994

6095
This process creates an analysis file from a process dump file. This analysis file contains a limited set of information outlining the current state of the

0 commit comments

Comments
 (0)