[NAS-2674] During the harvester Registration phase the harvester shuts down if its channel ID is unknown Created: 29/Sep/17  Updated: 25/Apr/18  Resolved: 20/Nov/17

Status: Closed
Project: NetarchiveSuite
Component/s: Harvester Controller Server
Affects Version/s: None
Fix Version/s: 5.4

Type: Improvement Priority: Major
Reporter: Søren Vejrup Carlsen (Inactive) Assignee: Søren Vejrup Carlsen (Inactive)
Resolution: Fixed  
Labels: None
Remaining Estimate: Not Specified
Time Spent: 1m
Original Estimate: Not Specified

Sprint: NAS 5.4
Verification:

In a running NAS instance.

  1. Log into any harvester
  2. Go to the conf directory and change the settings for a harvester to an invalid channel name - ie any name that doesn't exist in the system
  3. Restart the harvester
  4. Check the logs for a statement that an email warning has been sent.
  5. Check that you receive a mail like
    Host: sb-test-har-001.statsbiblioteket.dk
    Date: Wed Apr 25 14:15:20 CEST 2018
    dk.netarkivet.harvester.heritrix3.HarvestControllerServer.visit(HarvestControllerServer.java:243)
    Received message stating that channel 'HIPRIORITY' is invalid. Will stop. Probable cause: the channel is not one of the known channels stored in the channels table
    

 Description   

During the harvester Registration phase the harvester shuts down if its channel ID is unknown

@Override
    public void visit(HarvesterRegistrationResponse msg) {
        // If we have already started or the message notifies for another channel, resend it.
        String channelName = msg.getHarvestChannelName();
        if (status.isChannelValid() || !CHANNEL.equals(channelName)) {
            // Controller has already started
            jmsConnection.resend(msg, msg.getTo());
            if (log.isTraceEnabled()) {
                log.trace("Resending harvest channel validity message for channel '{}'", channelName);
            }
            return;
        }

        if (!msg.isValid()) {
            log.error("Received message stating that channel '{}' is invalid. Will stop. "
                        + "Probable cause: the channel is not one of the known channels stored in the channels table", channelName);
            close();
            return;
        }

It should also send a notification about the problem before shutting down.



 Comments   
Comment by Colin Rosenthal [ 24/Apr/18 ]

The release test description for this issue is missing. What is the expected/required behaviour?

Generated at Fri Apr 26 10:34:11 CEST 2024 using Jira 9.4.15#940015-sha1:bdaa9cbecfb6791ea579749728cab771f0dfe90b.