What is refresh-policy-routes@ens5.service that shows up in the ec2 logs so often?

0

The logs are filled with this:

systemd[1]: Starting refresh-policy-routes@ens5.service - Refresh policy routes for ens5...

ec2net[6999]: Starting configuration for ens5

audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=refresh-policy-routes@ens5 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=?>terminal=? res=success'

audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 >msg='unit=refresh-policy-routes@ens5 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? >terminal=? res=success'

systemd[1]: refresh-policy-routes@ens5.service: Deactivated successfully. systemd[1]: Finished refresh-policy-routes@ens5.service - Refresh policy routes for ens5.

It looks like it is happening every two minutes.

asked 15 days ago85 views
1 Answer
1
Accepted Answer

Hello.

I think it's related to "amazon-ec2-net-utils".
https://github.com/amazonlinux/amazon-ec2-net-utils/tree/main

"refresh-policy-routes" is defined in the systemd configuration below.
https://github.com/amazonlinux/amazon-ec2-net-utils/blob/main/systemd/system/refresh-policy-routes%40.service

A shell script called "setup-policy-routes" is executed in the systemd settings.
As far as I can see the contents of the shell script, I don't think it is doing anything harmful to EC2, so I think it's safe to rest assured.
https://github.com/amazonlinux/amazon-ec2-net-utils/blob/main/bin/setup-policy-routes.sh

It seems that network settings (ENI, etc.) can be automatically configured on the OS side in order to run EC2 on VPC.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/best-practices-for-configuring-network-interfaces.html

profile picture
EXPERT
answered 15 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions