You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/deployments/custom-scripts/index.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,19 @@ Octopus supports the following scripting environments:
17
17
- PowerShell scripts (.ps1)
18
18
- Bash scripts (.sh)
19
19
- 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)
21
21
- F# scripts (.fsx)
22
22
23
23
Octopus can run these scripts on almost any operating system as long as the script runtime is installed and configured correctly.
24
24
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
+
25
33
## What you can do with custom scripts
26
34
27
35
If an activity can be scripted, Octopus can run that script as a standalone activity or as part of a larger orchestration.
Copy file name to clipboardExpand all lines: src/pages/docs/kubernetes/targets/kubernetes-agent/troubleshooting/index.md
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,56 @@ If you are using the default NFS storage however, then the script pod would be d
78
78
- being evicted due to exceeding its storage quota
79
79
- being moved or restarted as part of routine cluster operation
80
80
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
Copy file name to clipboardExpand all lines: src/pages/docs/support/process-dumps.md
+38-3Lines changed: 38 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ Due to the nature of data contained in a process dump, we take great care in han
22
22
We will also delete them as soon as they have been analyzed.
23
23
:::
24
24
25
+
## Creating process dumps on Windows
25
26
If you are capturing a process on your Octopus Server follow the below instructions:
26
27
27
28
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
36
37
37
38
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:
38
39
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)
40
41
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`.
42
43
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`.
43
44
1. You will notice the program looks similar to task manager. Navigate to the **tentacle.exe** process in the list of tasks.
44
45
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.
46
47
1. To capture the dump file for calamari.exe make sure your tentacle.exe process is expanded in process explorer and find calamari.exe.
47
48
1. Right click on it and select `Create Dump` and then `Create Full Dump`.
48
49
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
55
56

56
57
:::
57
58
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).
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`:
[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
+
58
93
## Dump file analysis
59
94
60
95
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