Jump to content


Upgrade instructions disambiguity

swarm upgrade perl windows

  • Please log in to reply
3 replies to this topic

#1 Max Pavlov

Max Pavlov

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts

Posted 09 December 2015 - 12:28 PM

Hi.

We've had Swarm from OVA + Windows installed P4D for several years now.

The 2015.3 Swarm came out. Here are the installation instructions for an upgrade: http://www.perforce....ade.2015.2.html

The newly added requirement, it seems, is to have a swarm-trigger.conf file. The document says "in the same folder the server is installed".

Well, is it "along side the p4d.exe"?

But what's more important, the instruction states one should use

path/to/perl swarm-trigger.pl -o

command to "instantiate" the new triggers.  Well, I've been using the .vbs version of the script to this point, as described by the installation instructions previously. Current upgrade instructions don't mention anything about. But - p4-bin folder still lists swarm-trigger.vbs file. Can I use it? Why P4 shifted from .vbs native to Windows to .pl that most likely no one wants to install on Windows server?

Thanks for clarifications.

#2 PeteS

PeteS

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 09 December 2015 - 02:16 PM

Hi Max,

My understanding is that we can switch to using the Perl triggers (which are more efficient than the VBS), but you don't have to. We're still using the VBS triggers in 2015.3 (which work fine); I'll probably switch over at the end of our next release cycle.

I've only looked briefly, but I believe the swarm-trigger.conf file only needed to be in the same location as the swarm-trigger.pl.

HTH,
Pete

#3 Max Pavlov

Max Pavlov

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts

Posted 09 December 2015 - 05:33 PM

Thank you very much Pete! I'll hold on to vbs triggers at this point.

#4 Max Pavlov

Max Pavlov

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts

Posted 10 December 2015 - 01:13 PM

To anyone who will try to upgrade triggers on Windows-based p4d, here is my outcome. A "by the book" setup of perl + swarm-triggers.pl setup on p4d results in a test executions of triggers to go fine in cmd, but Swarm itself isn't getting notified for some reason. No error, commits don't show up.

After realizing .pl approach doesn't trigger anything in swarm for me, I tried to use the new swarm-triggers.vbs from 2015.3 swarm distro. It has a new line to call the curl:
Line 84:
WshShell.Run DoubleQuote & CURL_EXE & DoubleQuote & " --output " & DoubleQuote & SWARM_LOG & DoubleQuote & " --stderr " & DoubleQuote & SWARM_LOG & DoubleQuote & " --max-time " & SWARM_MAXTIME & " --data " & Ttype & "," & Tvalue & " " & SWARM_QUEUE, 0

The author of the script was trying to be creative with the VB code but on our Windows Server 2012 R2 it just gives "System can't find file specified". Using the old way to execute a cmd from vbs:
WshShell.Run CURL_EXE & " --output " & SWARM_LOG & " --stderr " & SWARM_LOG & " --max-time " & SWARM_MAXTIME & " --data " & Ttype & "," & Tvalue & " " & SWARM_QUEUE, 0

works well with the new vbs script. I don't know whether the way with DoubleQuote was the only "addition" to the script, but I think it was in fact a failed one and it just confused the users.

Why .pl doesn't work on Windows yet remains a secret.

Update: Well, the problem with the new .vbs is that the call to shell start with DoubleQuote & CURL_EXE & DoubleQuote, but CURL_EXE is set at the top of the file with double quotes already. Thus, resulting in an error. Example file needs fixing, at least in a new release.



Also tagged with one or more of these keywords: swarm, upgrade, perl, windows

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users