Uploaded image for project: 'Traffic Control'
  1. Traffic Control
  2. TC-291

GenIso can't handle concurrent requests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.0, 2.0.0, 2.2.0
    • 2.1.0, 2.2.0
    • Traffic Ops

    Description

      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;

      Attachments

        Activity

          People

            Unassigned Unassigned
            dewrich Dewayne Richardson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: