jambonz / jambonz-infrastructure

packer and cloudformation templates for creating EC2-based jambonz deployments
23 stars 30 forks source link

rtp ami issue for linux-header in packer scritpt #72

Closed nitinpo-Kore closed 1 year ago

nitinpo-Kore commented 1 year ago

rtp ami issue for linux header.txt

for last these it was working:Linux ip-172-31-29-233 5.10.0-23-cloud-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux and current one is which is not working: Linux ip-172-23-11-181 5.10.0-23-cloud-amd64 #1 SMP Debian 5.10.179-3 (2023-07-27) x86_64 GNU/Linux

@davehorton pls check these one its happening now..i have attached the log for reference. I have also verified old ami from source list still facing same.

nitinpo-Kore commented 1 year ago

@davehorton did you spin up server with ami created and checked, these i have done already got error but ami created: Below is the Log: as its in PROD if you will confirm i will spin up the server from ami created.

==> amazon-ebs: make[2]: /lib/modules/5.10.0-23-cloud-amd64/build: No such file or directory. Stop. amazon-ebs: make[1]: Entering directory '/usr/local/src/rtpengine/kernel-module' ==> amazon-ebs: make[1]: [Makefile:34: modules] Error 2 amazon-ebs: make -C /lib/modules/5.10.0-23-cloud-amd64/build M=/usr/local/src/rtpengine/kernel-module O=/lib/modules/5.10.0-23-cloud-amd64/build modules ==> amazon-ebs: make: *** [Makefile:48: with-kernel] Error 2 amazon-ebs: make[2]: Entering directory '/usr/local/src/rtpengine/kernel-module' amazon-ebs: make[2]: Leaving directory '/usr/local/src/rtpengine/kernel-module' amazon-ebs: make[1]: Leaving directory '/usr/local/src/rtpengine/kernel-module' ==> amazon-ebs: cp: cannot stat './kernel-module/xt_RTPENGINE.ko': No such file or directory ==> amazon-ebs: modprobe: FATAL: Module xt_RTPENGINE not found in directory /lib/modules/5.10.0-23-cloud-amd64 ==> amazon-ebs: /tmp/script_9740.sh: line 33: /proc/rtpengine/control: No such file or directory ==> amazon-ebs: iptables v1.8.7 (nf_tables): unknown option "--id" ==> amazon-ebs: Try `iptables -h' or 'iptables --help' for more information.

davehorton commented 1 year ago

hmm. Not sure I will check. It seems something changed in a recent debian 11 ami on AWS

nitinpo-Kore commented 1 year ago

i have tried with old ami also faced same issue...you can try once ...i think so something to do with repo which is related to kernal : 5.10.0-23-cloud-amd64 #1 SMP Debian 5.10.179-3 (2023-07-27) for Debian 5.10.179-1 it was fine think so. image

davehorton commented 1 year ago

please be clearer: which kernel worked previously

nitinpo-Kore commented 1 year ago

Kernal :Linux ip-172-31-29-233 5.10.0-23-cloud-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux it was working.....

davehorton commented 1 year ago

I've opened an issue in the rtpengine repo https://github.com/sipwise/rtpengine/issues/1712

davehorton commented 1 year ago

should be fixed in latest commit. I have changed to using my own base debian 11 image, which is a public image

nitinpo-Kore commented 1 year ago

@davehorton thanks...but we need to see why its happening...in future if we need to upgrade os we will face difficulty ...Also for other AMI not faced any issue but seen you changed for other server as well....

nitinpo-Kore commented 1 year ago

@davehorton Not Working on local VM also using old packer script: Linux nitin 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux

then done below: sudo apt-get update # This will update the repositories list sudo apt-get upgrade # This will update all the necessary packages on your system sudo apt-get dist-upgrade # This will add/remove any needed packages reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot sudo apt-get install linux-headers-$(uname -r)

After that below was the version: Linux nitin 5.10.0-25-amd64 #1 SMP Debian 5.10.191-1 (2023-08-16) x86_64 GNU/Linux

And rtpengine service was working fine now.

means we can use any version but we need to follow above then create new ami

davehorton commented 1 year ago

I can't follow this very well. Please provide exact steps to recreate your issue

nitinpo-Kore commented 1 year ago

Actually i told i was able to reproduce on my local virtualbox system so it was not problem with aws ami image. then on my local virtualbox i have solved it by below steps:

sudo apt-get update # This will update the repositories list sudo apt-get upgrade # This will update all the necessary packages on your system sudo apt-get dist-upgrade # This will add/remove any needed packages reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot sudo apt-get install linux-headers-$(uname -r)

then i have run the packer script and after that verified rtpengine was working fine.

davehorton commented 1 year ago

The changes I have made are specifically for the aws packer scripts.