Sean Davis
12/09/2022, 9:02 PMcpu: "4"
and memory: "16G"
). Where is the recommended place to make that adjustments in prefect to result in the final kubernetes job manifest containing those resource requests? Custom manifest? JSON patch? Is there documentation that I missed somewhere? Thanks for any pointers.Josh
12/13/2022, 2:22 AMZachary Lee
12/16/2022, 10:51 PM<http://docker.io/hasura/graphql-engine:v2.0.9|docker.io/hasura/graphql-engine:v2.0.9>
) has suspiciously long query_execution_times
in its logs (30-240 seconds) for some POST requests:
{
"type": "http-log",
"timestamp": "2022-12-16T18:59:06.914+0000",
"level": "info",
"detail": {
"operation": {
"query_execution_time": 217.92351778,
"user_vars": {
"x-hasura-role": "admin"
},
"request_id": "0d820ccb-6294-42f1-8433-a7d1d9562684",
"response_size": 99,
"request_mode": "single",
"request_read_time": 0.000004808
},
"request_id": "0d820ccb-6294-42f1-8433-a7d1d9562684",
"http_info": {
"status": 200,
"http_version": "HTTP/1.1",
"url": "/v1alpha1/graphql",
"ip": "127.0.0.6",
"method": "POST",
"content_encoding": "gzip"
}
}
}
and it periodically says it's gracefully shutting down server
, which restarts the pod. Has anyone here experienced anything like this before?Malek
12/19/2022, 11:04 AMAram Karapetyan
12/22/2022, 1:18 PM11:57:28.377 | INFO | prefect.engine - Engine execution of flow run
'ec6916a8-2d40-4ffb-9df3-cfb39f82c875' aborted by orchestrator: This run has
already terminated
No logs anywhere.
Tasks/flows show as Crashed.John LaRocque
12/29/2022, 7:53 PMAnna Geller
phil
01/10/2023, 3:42 PMGarett Dunn
01/10/2023, 8:52 PMprefecthq/prefect:2.7.7-python3.9
image for the agentUday
01/12/2023, 8:27 PMKevin Grismore
01/13/2023, 2:47 PMShirley Monroe
01/13/2023, 3:56 PMsystem:serviceaccount:prefect:default
which does not have (and should not have) the necessary permissions. How can I change that to run as a more appropriate user/role?Aleksandr Liadov
01/18/2023, 2:40 PMKubernetesRun
(cpu_request
, memory_request
,cpu_limit
, memory_limit
)
In Prefect2 I use KubernetesJob
, how can I specify the same parameters?eddy davies
01/25/2023, 12:41 PMprefect deployment build prefect-test/main.py:main \
-q test \
-n test \
-t api-to-s3 \
-o deployment.yaml \
-sb s3/code \
-ib kubernetes-job/k8s-prod
But I am getting a module not found error. I added "EXTRA_PIP_PACKAGES": "s3fs"
to my Kubernetes Job block environment so that it can access code on s3 but it feels wrong to add all packages in there. I have a pyproject.toml
and requirements.txt
but neither seem to be being used to install packages.Farid
01/30/2023, 10:01 PMSubmission failed. kubernetes.client.exceptions.ApiException: (403) Reason: Forbidden HTTP response headers: HTTPHeaderDict({'Audit-Id': 'd3e45036-d667-49d4-8e3b-3a73bec788e1', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': '2681d750-c112-4385-86a3-ed13b9c2ebf2', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'f3844bc0-2265-4354-9d81-5b753f0d513e', 'Date': 'Mon, 30 Jan 2023 21:34:52 GMT', 'Content-Length': '313'}) HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"jobs.batch is forbidden: User \"system:serviceaccount:data-eng:default\" cannot create resource \"jobs\" in API group \"batch\" in the namespace \"data-eng\"","reason":"Forbidden","details":{"group":"batch","kind":"jobs"},"code":403}
the deployments:
apiVersion: apps/v1
kind: Deployment
metadata:
name: prefect-agent
namespace: data-eng
labels:
app: prefect-agent
spec:
selector:
matchLabels:
app: prefect-agent
replicas: 1
template:
metadata:
labels:
app: prefect-agent
spec:
containers:
- name: agent
image: prefecthq/prefect:2.7.8-python3.9
command: ["prefect", "agent", "start", "-q", "k8s-us-west-2-prod"]
imagePullPolicy: "IfNotPresent"
env:
- name: PREFECT_API_URL
value: <https://api.prefect.cloud/api/accounts/XX/workspaces/YY>
- name: PREFECT_API_KEY
valueFrom:
secretKeyRef:
name: prefect-cloud-api-token
key: prefect-cloud-api-token-value
---
apiVersion: <http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>
kind: Role
metadata:
namespace: data-eng
name: prefect-agent
rules:
- apiGroups: [""]
resources: ["pods", "pods/log", "pods/status"]
verbs: ["get", "watch", "list"]
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: [ "get", "list", "watch", "create", "update", "patch", "delete" ]
---
apiVersion: <http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>
kind: RoleBinding
metadata:
name: prefect-agent-role-binding
namespace: data-eng
subjects:
- kind: ServiceAccount
name: prefect-agent
namespace: data-eng
roleRef:
kind: Role
name: prefect-agent
apiGroup: <http://rbac.authorization.k8s.io|rbac.authorization.k8s.io>
---
# The default manifest generated by `prefect kubernetes manifest agent` uses the default sa in the namespace.
# We will explicitly create a sa and attach the annotation required.
kind: ServiceAccount
metadata:
name: prefect-agent
namespace: data-eng
annotations:
<http://eks.amazonaws.com/role-arn|eks.amazonaws.com/role-arn>: arn:aws:iam::XX:role/an-irsa-role
---
Needles to say that I have specified the same namespace and serviceAccount name in the Blocks but clearly the agent still tries to use the default serviceAccount to create jobs. any idea?Steph Clacksman
02/02/2023, 12:57 PMAram Karapetyan
02/03/2023, 1:37 PMnicholasnet
02/07/2023, 4:04 PMnicholasnet
02/07/2023, 4:05 PMShirley Monroe
02/07/2023, 5:00 PMkubernetes-job
that I want to be able to enable task result caching so all the subflows within the same pod could reuse results. I think I need to set up the pods to have a volume mounted for storage; how can I specify that in the deployment config?
Also, there's one task that would be called with the same parameters from multiple concurrent flows. It'd be awesome to be able to cache that result & have it available across pods, but barring that, if I set up caching for that task would it be expected to cache correctly independently for all the pods? 🤞Zachary Lee
02/08/2023, 5:41 PMaborted by orchestrator: This run has already terminated.
Is there some way I can configure the internal timeout for waiting for the pod to be scheduled? Configuring retries does not seem to make a difference. Thanks!nicholasnet
02/16/2023, 6:41 PMHongbo Miao
02/18/2023, 1:41 AMPREFECT_SERVER_UI_API_URL
or PREFECT_ORION_UI_API_URL
after the rebranding? Thanks!Hongbo Miao
02/24/2023, 12:23 AMConnectionRefusedError: [Errno 111] Connect call failed (‘127.0.0.1’, 4200)I am stuck here for over a week. Any guide would be appreciate. Thanks! 😃 https://discourse.prefect.io/t/connectionrefusederror-errno-111-connect-call-failed-127-0-0-1-4200/2415
Blake Stefansen
03/03/2023, 2:44 PM14:16:50.649 | INFO | prefect.agent - Submitting flow run 'ef043a55-545c-4495-8a63-8263931c06e7'
14:16:51.894 | INFO | prefect.infrastructure.kubernetes-job - Job 'flow-run-started-for-tx-csv-mock-csv-tpwv2': Pod has status 'Pending'.
14:16:51.897 | INFO | prefect.agent - Completed submission of flow run 'ef043a55-545c-4495-8a63-8263931c06e7'
14:17:01.677 | INFO | prefect.agent - Submitting flow run 'ef043a55-545c-4495-8a63-8263931c06e7'
14:17:02.388 | INFO | prefect.infrastructure.kubernetes-job - Job 'flow-run-started-for-tx-csv-mock-csv-bnhgs': Pod has status 'Pending'.
14:17:02.429 | INFO | prefect.agent - Completed submission of flow run 'ef043a55-545c-4495-8a63-8263931c06e7'
14:17:26.237 | INFO | prefect.infrastructure.kubernetes-job - Job 'flow-run-started-for-tx-csv-mock-csv-tpwv2': Pod has status 'Running'.
14:17:29.652 | INFO | prefect.infrastructure.kubernetes-job - Job 'flow-run-started-for-tx-csv-mock-csv-bnhgs': Pod has status 'Running'.
14:19:44.562 | ERROR | prefect.infrastructure.kubernetes-job - Job 'flow-run-started-for-tx-csv-mock-csv-tpwv2': Job did not complete within timeout of 5s.
14:19:44.685 | ERROR | prefect.infrastructure.kubernetes-job - Job 'flow-run-started-for-tx-csv-mock-csv-bnhgs': Job did not complete within timeout of 5s.
14:19:44.719 | INFO | prefect.agent - Reported flow run 'ef043a55-545c-4495-8a63-8263931c06e7' as crashed: Flow run infrastructure exited with non-zero status code -1.
Joël Luijmes
03/08/2023, 2:51 PMHongbo Miao
03/10/2023, 9:43 PMJacob Hall
03/15/2023, 7:08 PMPeddakotla Sravan Kumar Reddy
03/19/2023, 6:32 AMPeddakotla Sravan Kumar Reddy
03/19/2023, 6:34 AM