Scheduler (HTTP API and webapp) for running Mesos tasks—long running processes, one-off tasks, and scheduled jobs. #hubspot-open-source
This is planned to be the final public release of Singularity. We want to thank all those that have contributed over the past years for all of their help! If you need assistance with Singularity the team will plan to keep the singularity-framework slack open for another few months.
1.5.0
Check out the 1.5.0 milestone to see new features / bugfixes in detail.
cpu,cpuacct
cgroup mountpoints1.4.0
Check out the 1.4.0 milestone to see new features / bugfixes in detail.
1.3.0
Check out the 1.3.0 milestone to see new features / bugfixes in detail. This release contains a few major items worth calling out separately:
size
override for logrotateAdditionalFileslogrotateadditionalfiles
deletion.1.2.0
Check out the 1.2.0 milestone to see new features / bugfixes in detail.
1.1.0
Check out the 1.1.0 milestone to see new features / bugfixes in detail.
Singularity 1.1.0
is mainly focused on scheduler performance. Internally we have also begun testing this version on java 11. Some java 11 notes:
1.0.0
Singularity has been running our production infrastructure at HubSpot for years and the team is happy to announce a (probably long overdue) 1.0.0
release. Check out the 1.0.0 milestone to see new changes in detail.
Singularity 1.0.0
includes a pile of tech debt cleanup. The most significant of these is a move from the deprecated guava Optional
to the newer java.util.Optional
. Any java clients using the SingularityBase
or SingularityClient
modules will need to update appropriately. While very similar, the two Optional
s are not binary compatible. This article breifly explains a few of the differences.
0.23.0
Check out the 0.23.0 milestone to see new features / bugfixes in detail. 0.23.0
in general represents a number of performance improvements in relation to Singularity's usage of zookeeper and mysql as well as a mesos version bump.
MySQL/Postgres
0.23.0
contains multiple database migrations (https://github.com/HubSpot/Singularity/pull/1928 + https://github.com/HubSpot/Singularity/pull/1956). These must be run BEFORE deploying the new version of SingularityService and are compatible with the running 0.22.0 release. You can check out our docs on migrations to run these with liquibase. If you manage a larger installation of Singularity utilizaing mysql (e.g. millions of tasks in task history), we recommend running the migrations using pt-online-schema-change to minimize interruptions. Migrations and ptosc arguments are listed below for convinience:
--count 1
option when running db migrate
--alter "CHARACTER SET ascii COLLATE ascii_bin, MODIFY COLUMN request blob DEFAULT NULL, MODIFY COLUMN requestId varchar(100) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, MODIFY COLUMN requestState ENUM ('CREATED', 'UPDATED', 'DELETING', 'DELETED', 'PAUSED', 'UNPAUSED', 'ENTERED_COOLDOWN', 'EXITED_COOLDOWN', 'FINISHED', 'DEPLOYED_TO_UNPAUSE', 'BOUNCED', 'SCALED', 'SCALE_REVERTED') NOT NULL, MODIFY COLUMN user varchar(100) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL, MODIFY COLUMN message varchar(280) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, ADD COLUMN json JSON DEFAULT NULL"
--alter "CHARACTER SET ascii COLLATE ascii_bin, MODIFY COLUMN bytes MEDIUMBLOB DEFAULT NULL, MODIFY COLUMN requestId varchar(100) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, MODIFY COLUMN deployId varchar(100) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, MODIFY COLUMN user varchar(100) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL, MODIFY COLUMN message varchar(280) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, MODIFY COLUMN deployState ENUM ('SUCCEEDED', 'FAILED_INTERNAL_STATE', 'CANCELING', 'WAITING', 'OVERDUE', 'FAILED', 'CANCELED') NOT NULL, ADD COLUMN json JSON DEFAULT NULL"
--alter "CHARACTER SET ascii COLLATE ascii_bin, MODIFY COLUMN bytes MEDIUMBLOB DEFAULT NULL, MODIFY COLUMN taskId varchar(200) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, MODIFY COLUMN requestId varchar(100) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, MODIFY COLUMN lastTaskStatus ENUM ('TASK_LAUNCHED', 'TASK_STAGING', 'TASK_STARTING', 'TASK_RUNNING', 'TASK_CLEANING', 'TASK_KILLING', 'TASK_FINISHED', 'TASK_FAILED', 'TASK_KILLED', 'TASK_LOST', 'TASK_LOST_WHILE_DOWN', 'TASK_ERROR', 'TASK_DROPPED', 'TASK_GONE', 'TASK_UNREACHABLE', 'TASK_GONE_BY_OPERATOR', 'TASK_UNKNOWN') NOT NULL, MODIFY COLUMN runId varchar(100) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL, MODIFY COLUMN deployId varchar(100) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL, ADD COLUMN json JSON DEFAULT NULL, ADD KEY requestDeployUpdated (requestId, deployId, updatedAt), ADD KEY hostUpdated (host, updatedAt)"
--alter "CHARACTER SET ascii COLLATE ascii_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, MODIFY COLUMN requestId varchar(100) CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT '', MODIFY COLUMN taskId varchar(200) CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT ''"
As seen above, these migrations prep Singularity to use mysql's json data type instead of a blob for history storage. All net-new history will be stored in the json format and old lob columns are not yet dropped. Singularity will look for either format currently when fetching individual task histories. You can kick off a backfill of data from blob -> json format by sending an http POST to the /api/history/sql-backfill?batchSize=20
endpoint on SingularityService (batch size is configurable to balance resources vs speed). If Singularity need to restart/etc, this process is idempotent and can be kicked off as many times as needed, though only one invocation can run at a time.
Zookeeper
On startup, Singularity will run a number of migrations to zookeeper task data. These are aimed at reducing the possible size of any single zookeeper read. You may notice that the first startup of the new Singularity release is slower due to these changes running. This migration is idempotent and will be re-attempted on next startup if it should fail.
Singularity 0.23.0
is build against mesos 1.8, but should be compatible with all earlier 1.x versions of mesos
SingularityRequestBuilder
& SingularityDeployBuilder
logrotateAdditionalFile
s 15 mins after task termination.0.22.0
Check out the 0.22.0 milestone to see new features / bugfixes in detail. 0.22.0
represents an upgrade to mesos 1.6.1
. This also includes an upgrade to protobuf 3 and a move to a separate fork of mesos-rxjava. Instuctions for upgrading mesos can be found here. In internal testing we found communications between old mesos master/upgraded scheduler and vice versa were both backwards compatible back to mesos 1.1.0
.
0.21.0
Check out the 0.21.0 milestone to see new features / bugfixes in detail.