Bug 249168

Summary: make cloudware-release fails with "make_esp_file not found"
Product: Base System Reporter: nbari
Component: binAssignee: Oleksandr Tymoshenko <gonzo>
Status: Closed FIXED    
Severity: Affects Only Me CC: emaste, gonzo
Priority: ---    
Version: 12.1-STABLE   
Hardware: Any   
OS: Any   

Description nbari 2020-09-07 13:57:54 UTC
When trying to create a release using:

  cd /usr/src/releases
  make WITH_CLOUDWARE=yes CLOUDWARE=ec2 VMSIZE=4G VMFORMATS=raw cloudware-release 

or 

   sh releases.sh

The images can not be created because of the missing make_esp_file function:

https://github.com/freebsd/freebsd/commit/00fc01fa980d371192559bfff83c026134956aca
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-09-07 18:48:12 UTC
A commit references this bug:

Author: gonzo
Date: Mon Sep  7 18:47:26 UTC 2020
New revision: 365425
URL: https://svnweb.freebsd.org/changeset/base/365425

Log:
  Revert r364939 and add a stable/12 approach for populating the ESP

  make_esp_file is not available in stable/12 so r364939 broke VM-related targets.
  Revert offending commit and use pre-r342283 approach to populate ESP partition.

  PR:		249168
  Tested on:	VirtualBox, Hyper-V v2 VM

Changes:
  stable/12/release/tools/vmimage.subr
Comment 2 nbari 2020-09-07 19:15:25 UTC
Thanks, image can be created now problem now is uploading the AMI:

This is the error I am getting:

/dev/md1: 4000.0MB (8192000 sectors) block size 32768, fragment size 4096
        using 7 cylinder groups of 626.09MB, 20035 blks, 80256 inodes.
super-block backups (for fsck_ffs -b #) at:
 192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632
tunefs: soft updates set
Creating image...  Please wait.

touch cw-ec2
/usr/local/bin/bsdec2-image-upload     --sriov --ena  /usr/obj/usr/src/amd64.amd64/release/ec2.raw  "FreeBSD 12.2-PRERELEASE-amd64-2020-09-07"  "FreeBSD/amd64 stable/12@365425"  us-east-2 amis-nbari /usr/home/nbari/aws.file
Uploading /usr/obj/usr/src/amd64.amd64/release/ec2.raw to
http://amis-nbari.s3.amazonaws.com/e7823e2b2fcf5a895c671351aef69183/
in 401 part(s).bsdec2-image-upload: SSL request failed: Could not write payload: Broken pipe
S3 PUT failed 1 times: /e7823e2b2fcf5a895c671351aef69183/part0
bsdec2-image-upload: SSL request failed: Could not write payload: Broken pipe
S3 PUT failed 2 times: /e7823e2b2fcf5a895c671351aef69183/part0
...
bsdec2-image-upload: PUT failed
bsdec2-image-upload: Failure uploading disk image
*** Error code 1

Stop.
make: stopped in /usr/src/release


I am using this:

make WITH_CLOUDWARE=yes CLOUDWARE=EC2 VMSIZE=4G VMFORMATS=raw ec2ami
Comment 3 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2020-09-07 19:51:34 UTC
As I mentioned on GitHub page, this error is not related to the EFI partition, so I can't say for sure what happens there. Did you set up all AWS roles/permissions as described in https://github.com/cperciva/bsdec2-image-upload/blob/master/SETUP ?

If you did and upload utility still doesn't work, you may want to contact its author cperciva@FreeBSD.org or open a new issue on the tool's project: https://github.com/cperciva/bsdec2-image-upload
Comment 4 Ed Maste freebsd_committer freebsd_triage 2022-06-02 18:11:44 UTC
The reported issue is fixed, any issues with the ec2 upload tools need to be submitted against that project.