Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating build #6236

Closed
rsidhaarth opened this issue Sep 26, 2021 · 3 comments
Closed

creating build #6236

rsidhaarth opened this issue Sep 26, 2021 · 3 comments
Labels
bug something isn't working as intended build related to the build process

Comments

@rsidhaarth
Copy link

rsidhaarth commented Sep 26, 2021

Could not able to create a build using 5.1.2.tar.gz using "build/clean_build.sh"

[root@ops trafficcontrol]# build/clean_build.sh
++ readlink build/clean_build.sh
+ script_path=
+ script_path=build/clean_build.sh
++ dirname build/clean_build.sh
+ cd build
++ git rev-parse --show-toplevel
+ tc_volume=
+ tc_volume=/trafficcontrol
+ export GOPATH=/tmp/go GOOS=linux
+ GOPATH=/tmp/go
+ GOOS=linux
+ tc_dir=/tmp/go/src/github.com/apache/trafficcontrol
+ which cygpath
+ mkdir -p /tmp/go
+ cd /tmp/go
++ dirname /tmp/go/src/github.com/apache/trafficcontrol
+ mkdir -p src pkg bin /tmp/go/src/github.com/apache
+ rsync -a --exclude=/dist --exclude=/.m2 /trafficcontrol/ /tmp/go/src/github.com/apache/trafficcontrol
rsync: change_dir "/trafficcontrol" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1179) [sender=3.1.2]
+ exit_code=23
+ '[' 23 -ne 0 ']'
+ echo 'Error on line 1 of build/clean_build.sh'
Error on line 1 of build/clean_build.sh
+ cleanup
+ setowner /trafficcontrol /trafficcontrol/dist
++ stat -c%u:%g /trafficcontrol
++ stat -f%u:%g /trafficcontrol
stat: invalid option -- '%'
Try 'stat --help' for more information.
+ own=
[root@ops trafficcontrol]#

Where as if I clone https://github.com/apache/trafficcontrol , the same is working and version 6 is getting built.

@rsidhaarth rsidhaarth added the bug something isn't working as intended label Sep 26, 2021
@rsidhaarth rsidhaarth changed the title Issue when using postinstalll creating build Sep 26, 2021
@rsidhaarth
Copy link
Author

Also, postinstall is giving the following error

/opt/traffic_ops/install/bin/postinstall -a --cfile /opt/traffic_ops/install/bin/input.json

OK 2021010900000002_add_max_request_header_size_delivery_service.sql
2021/09/26 14:28:11 FAIL 2021010900000003_server_interface_ip_address_cascade.sql (pq: constraint "ip_address_interface_fkey" of relation "ip_address" does not exist), quitting migration.
Can't run goose: exit status 1
Database migrate failed
Died at /opt/traffic_ops/install/lib/InstallUtils.pm line 62.
Error on line 57 of /opt/traffic_ops/install/bin/postinstall

This is first time installation.

@mitchell852 mitchell852 added the install related to the installation process label Sep 30, 2021
@zrhoffman
Copy link
Member

zrhoffman commented Oct 1, 2021

Could not able to create a build using 5.1.2.tar.gz using "build/clean_build.sh"

The official, supported way of build ATC components is by running ./pkg. If you wanted to try building ATC 5.1.2 using build/clean_build.sh anyway, you would need to clone the repo using git and checkout the RELEASE-5.1.2 tag.

Also, postinstall is giving the following error

Looks like you opened #6237 for this.

I noticed that you created #6236 describing a totally separate bug before editing it to be about build/clean_build.sh:

hashed = hashlib.scrypt(passwd.encode(), salt=salt, n=n, r=r_val, p=p_val, dklen=dklen)
AttributeError: module 'hashlib' has no attribute 'scrypt'

Please do not edit Issues to describe a different bug than the bug described when it was created.

@zrhoffman zrhoffman added build related to the build process and removed install related to the installation process labels Oct 1, 2021
@zrhoffman
Copy link
Member

[root@ops dist]# /opt/traffic_ops/install/bin/postinstall -a --cfile /opt/traffic_ops/install/bin/input.json
INFO:root:Starting postinstall
INFO:root:Debug is on
INFO:root:Running in automatic mode
INFO:root:Using input file /opt/traffic_ops/install/bin/input.json
INFO:root:Adding question 'Port to serve on?' with default answer 443
INFO:root:Adding question 'ldap.conf location?' with default answer /opt/traffic_ops/app/conf/ldap.conf
INFO:root:Adding question 'LDAP server hostname' with default answer
INFO:root:Adding question 'LDAP Admin Password' with default answer
INFO:root:Adding question 'LDAP Search Query' with default answer
INFO:root:Adding question 'LDAP Skip TLS verify' with default answer
INFO:root:Adding question 'LDAP Timeout Seconds' with default answer
INFO:root:File sanity check complete - found 7 differences
INFO:root:===========/opt/traffic_ops/app/conf/production/database.conf===========
INFO:root:Database configuration has been saved
INFO:root:===========/opt/traffic_ops/app/conf/production/tv.conf===========
INFO:root:Database configuration has been saved
INFO:root:Not setting up ldap
INFO:root:===========/opt/traffic_ops/install/data/json/users.json===========
Traceback (most recent call last):
File "/opt/traffic_ops/install/bin/_postinstall.py", line 1528, in
ARGS.no_database
File "/opt/traffic_ops/install/bin/_postinstall.py", line 1304, in main
root_dir
File "/opt/traffic_ops/install/bin/_postinstall.py", line 580, in generate_users_conf
hashed_pass = hash_pass(config["tmAdminPw"])
File "/opt/traffic_ops/install/bin/_postinstall.py", line 433, in hash_pass
hashed = hashlib.scrypt(passwd.encode(), salt=salt, n=n, r=r_val, p=p_val, dklen=dklen)
AttributeError: module 'hashlib' has no attribute 'scrypt'
Error on line 50 of /opt/traffic_ops/install/bin/postinstall

I have installed all the dependencies and still getting this error. I am using CentOS 7.

@rsidhaarth This was an edge-case caused by the fact that you have Python 3.6 installed, in addition to the default Python 2.7 installation on CentOS 7. The fix, #6285, is included in Traffic Control 6.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended build related to the build process
Projects
None yet
Development

No branches or pull requests

3 participants