[TC-291] GenIso can't handle concurrent requests #892
Labels
high impact
impacts the basic function, deployment, or operation of a CDN
new feature
A new feature, capability or behavior
Traffic Ops
related to Traffic Ops
Because GenIso always changes the same files (no temporary directories created), it can't handle concurrent requests. We sometimes send commands to create 10 Edge Caches at the same time and we found out that the wrong IP address shows up on servers.
I've got the code to fix it up (but need to sign our paperwork). But our GenIso.pm now deviates from what's in Traffic Ops because we wanted to keep the 1.0.0 functionality (don't use the install_cfg directory, keep using the simple network line).
Suggestion: We should have a parameter to call different ISO generator scripts. Seems like this is implementation specific and not really a core function of Traffic Ops.
Basic changes :
use File::Temp;
use File::Copy::Recursive;
my $tmpdir = File::Temp::tempdir(CLEANUP => 1);
...
GenIso.pm: my $tmp = File::Copy::Recursive::dircopy($dir,$tmpdir);
GenIso.pm: my $cfg_dir = "$tmpdir/$install_cfg";
GenIso.pm: print STUF "Dir== $tmpdir\n";
GenIso.pm: my $cmd = "mkisofs -joliet-long -input-charset utf-8 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T $tmpdir";
GenIso.pm: open(IN, "<$tmpdir/ks.src") || die("$tmpdir/ks.src:$!");
GenIso.pm: open (OUT, ">$tmpdir/ks.cfg") || die("$tmpdir/ks.cfg:$!");
GenIso.pm: File::Path::rmtree $tmpdir;
Author: Dewayne Richardson
JIRA Link: https://issues.apache.org/jira/browse/TC-291
Found Version: 2.1.0
The text was updated successfully, but these errors were encountered: