Skip to content

Commit

Permalink
feat: add troublshooting section
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Oct 12, 2023
1 parent a253e18 commit b65cec6
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,33 @@ helm upgrade diracx-demo ./diracx --values .demo/values.yaml

TODO

## Troubleshooting

### DNS Issues

Depending on your network configuration or internet service provider restrictions, you might encounter DNS resolution issues, as evidenced by errors like:

```
$ diracx-charts/run_demo.sh diracx DIRAC diracx-web
🦄 Found package directories for: diracx DIRAC diracx-web
💀 ping command exited with a non-zero exit code
ping: <ip>.nip.io: Name or service not known
💀 ping command exited with a non-zero exit code
Failed to find an appropriate hostname for the demo.
```

This error indicates that the system cannot resolve the domain `<ip>.nip.io`. This might be due to restrictions placed by your internet provider or network configuration. To resolve this, you have two options:

1. **Switch Networks:** Try running the demo from a different network that does not have such restrictions.

2. **Modify Hosts File and Enable DNS Hack:**
- Add an entry to your `/etc/hosts` file with the unresolved IP address and hostname, like this:
```
<ip> <ip>.nip.io
```
- Then, in your configuration, set `dnsHack.enabled` to `true`. This action ensures that the IP address is recognized within the cluster.
## Requirements
| Repository | Name | Version |
Expand Down Expand Up @@ -121,6 +148,7 @@ TODO
| diracxWeb.image.tag | string | `"latest"` | |
| diracxWeb.service.port | int | `8080` | |
| diracxWeb.service.type | string | `"ClusterIP"` | |
| dnsHack.enabled | bool | `false` | |
| fullnameOverride | string | `""` | |
| global.batchJobTTL | int | `600` | |
| image.pullPolicy | string | `"Always"` | |
Expand Down
22 changes: 14 additions & 8 deletions diracx/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.dnsHack.enabled }}
hostAliases:
- ip: {{ .Values.diracx.hostname | trimSuffix ".nip.io" }}
hostnames:
- {{ .Values.diracx.hostname }}
{{- end }}
serviceAccountName: {{ include "diracx.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
Expand Down Expand Up @@ -96,14 +102,14 @@ spec:
- name: http
containerPort: {{ .Values.diracx.service.port }}
protocol: TCP
# livenessProbe:
# httpGet:
# path: /api/docs/
# port: http
# readinessProbe:
# httpGet:
# path: /api/docs/
# port: http
livenessProbe:
httpGet:
path: /api/docs/
port: http
readinessProbe:
httpGet:
path: /api/docs/
port: http
command: ["bash", "/entrypoint.sh"]
args:
- uvicorn
Expand Down
3 changes: 3 additions & 0 deletions diracx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ developer:
# If set, mount the CS stored localy instead of initializing a default one
localCSPath: /local_cs_store

dnsHack:
enabled: false

diracx:
# Required: The hostname where the webapp/API is running
# hostname:
Expand Down

0 comments on commit b65cec6

Please sign in to comment.